我对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>
<input type="button" class="BigButton" onClick="$('.File').click();"/>
</form>这是我对输入文件的CSS样式
input.File {
position: relative;
text-align: right;
-moz-opacity:0 ;
filter:alpha(opacity: 0);
opacity: 0;
z-index: 2;
}发布于 2011-06-05 18:37:00
对我来说很好。您确定要以这种方式使用onchange吗?
<input type="file" onchange="alert('')" />https://stackoverflow.com/questions/6242229
复制相似问题