Internet explorer 不';t工作“;onchange";在IE中
我对IE 7-9中的Internet explorer 不';t工作“;onchange";在IE中,internet-explorer,onchange,input-type-file,Internet Explorer,Onchange,Input Type File,我对IE 7-9中的onchange属性有一些问题。它不适用于input type=“file”标记。在其他浏览器中,它运行良好 这是我的代码: <form enctype="multipart/form-data" action="" method="POST"> <input type="file" name="photo" class="File" onchange="$('form').submit();"/></br>
onchange
属性有一些问题。它不适用于input type=“file”
标记。在其他浏览器中,它运行良好
这是我的代码:
<form enctype="multipart/form-data" action="" method="POST">
<input type="file" name="photo" class="File" onchange="$('form').submit();"/></br>
<input type="button" class="BigButton" onClick="$('.File').click();"/>
</form>
对我来说很好。您确定要这样使用
onchange
<input type="file" onchange="alert('')" />
你的英语足够好了。您可以在这里添加代码,以便我们可以看到您如何为输入标记设置onchange事件吗?请确保正确格式化代码(单击工具栏中的花括号)。谢谢,我添加了代码。做得好。现在让我们看看你是否得到了答案。@DOK,我忘了添加css代码。请再次查看,IE9不起作用。我通过更改浏览器模式测试的所有其他版本。我无法在IE9中测试。也许您需要Doctype?主页面有xhtml Doctype,但在iframe页面中加载mycode时没有。然后在iframe页面上尝试使用Doctype。
<input type="file" onchange="alert('')" />