首页 > Web开发 > 详细

关于附件控件隐藏后,在IE下不能上传,报“拒绝访问”

时间:2015-05-14 16:13:55      阅读:236      评论:0      收藏:0      [点我收藏+]

报错时的使用:

@Html.TextBoxFor(m => m.FileName, new { style = "width:457px;", @readonly = "readonly" })
<button class="btn" type="button" onclick="$(‘#attachFile‘).click()"><span class="fa fa-folder"></span>选择</button>
<input id="attachFile" onchange="attachFileChange()" type="file" name="attachFile" style="display:none;" />

修改后的使用:

@Html.TextBoxFor(m => m.FileName, new { style = "width:457px;", @readonly = "readonly" })
<button class="btn" style="" type="button"><span class="fa fa-folder"></span>选择</button>
<input id="attachFile" style="position:absolute;left:0px;top:0;width:520px;height:100%;z-index:999;opacity:0;filter:alpha(opacity=0);-moz-opacity:0;-kh tml-opacity:0;" onchange="attachFileChange();" type="file" name="attachFile" />

 

修改后测试通过

关于附件控件隐藏后,在IE下不能上传,报“拒绝访问”

原文:http://www.cnblogs.com/kimi-gyj/p/4503330.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!