access denied using ie when upload file

本文探讨了在Internet Explorer浏览器中遇到的一个常见问题:从一个框架尝试提交另一个框架内的表单时出现的安全限制。文章建议避免使用form.submit()方法,并推荐采用让用户点击提交按钮并利用表单的onsubmit事件进行验证的方式。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

That's right, avoid form.submit() if you can. (And 99% of the time, you can.) IE (especially IE7) takes a lot of extra security precautions when a script in one frame tries to invoke certain actions (such as form submission) in another frame. Instead, have the user click a "submit" button and cancel (if necessary) using an "onsubmit" handler attached to the form, instead of validating and then submitting.

Although browsers can be difficult, there are many ways to get the job done. If your first approach doesn't work there are probably several others that will.

 

转自:http://bytes.com/topic/javascript/answers/602230-problem-ie-ajax-file-upload-via-iframe-javascript-error-access-denied-zugriff-verweigert

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值