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('')" />
精彩评论