Google Chrome中HTML输入类型=“文件"未显示弹出窗口 [英] HTML input type=“file” in Google Chrome not showing popup window
问题描述
我在Google Chrome浏览器中的HTML标签<input type="file" />
遇到了问题.
I'm having a problem with the HTML tag <input type="file" />
in Google Chrome.
浏览"按钮按预期显示在页面上,但是当我单击它以选择文件时,浏览器的弹出对话框窗口根本无法打开.
The 'Browse' button appears on the page as expected, but when I click it in order to select a file, the pop-up dialog window from the browser doesn't open at all.
我已经在Firefox中测试了我的表单,并且工作正常.任何想法出什么事了,我该如何解决?
I 've tested my form and in Firefox and works correct. Any ideas what's wrong and how can I fix it ?
这也是代码:
<form action="" method="post" accept-charset="utf-8" enctype="multipart/form-data">
<label for="imgfile">File input</label>
<input type="file" name="imgfile" />
推荐答案
没有理由在Chrome中不起作用.您是否尝试过将您给我们的示例中的标记仅复制到HTML文件中,然后将其打开?它行得通吗?除非有第三方插件或扩展程序阻止它,否则它应该会出现.
There's no reason that this shouldn't work in Chrome. Have you tried copying JUST the mark up in the example you've given us into a HTML file, and opening that? Does it work? It should, unless there's some third party plugin or extension stopping it.
可能是您在其他地方进行了标记,导致了此问题;也许输入字段上的一层在它可以下降到浏览"按钮之前就捕获了click事件?
It may be that you have have mark up elsewhere causing this issue; perhaps a layer over the input field catching the click event before it can make it's way down to the "browse" button?
这篇关于Google Chrome中HTML输入类型=“文件"未显示弹出窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!