开发者

Doesn't work "onchange" in IE

I have some issues with the onchange attri开发者_运维百科bute in IE 7-9. It doesn't work with input type="file" tag. In other browsers, it works good.

This is my code:

 <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>

This is my CSS style for the input file

input.File {
position: relative;
text-align: right;
-moz-opacity:0 ;
filter:alpha(opacity: 0);
opacity: 0;
z-index: 2;
}


Works just fine for me. Are you sure you are using onchange this way?

<input type="file" onchange="alert('')" />
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜