用jquery.form.js来上传图片在ie中拒绝访问

         在火狐,谷歌好使,在ie就出错了

         jquery.form.js版本2.77 jquery.min.js版本1.4.2

   

function changeFile() {
	document.form1.file.click();
	document.form1.file.value = document.getElementById("form1").file.value;
}

  
$(document).ready(function() {
						var options = {
							url : "a.action",//跳转到相应的Action  
							type : "POST",//提交方式  
							dataType : "script",//数据类型
							success : function(msg) {//调用Action后返回过来的数据
                           
								var data = msg.split("#");

								//alert(data[0]+"and"+data[1]);

							}
						};
						//$("#form1").ajaxSubmit(options);//绑定页面中form表单的id  
						window.setTimeout($('#form1').ajaxSubmit(options),0);
						
						return false;
					});
}
<form id="form1" name="form1" method="post"
			enctype="multipart/form-data">
			<table border="1" width="706px" align="center">
				<tr height="400px">
					<td valign="top">
						<div id="showImage"></div>
						<div id="uploaddiv" style="margin-top: 260px" align="center">
							<input type="file" name="file" id="upload"
								οnchange="uploadImage()" style="display: none" />
							<a href="javascript:changeFile();"><img alt="选择图片"
									src="checkImg.png" border="0px" >
							</a>
						</div>
					</td>
				</tr>
			</table>
		</form>


评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值