js中的moveTo与resizeTo发生Access is denied
来源:互联网 发布:c语言 va start 编辑:程序博客网 时间:2024/05/17 09:17
在IE7中,当用户拖动或改变窗口大小时有可能出现类似这样的js脚本错误:
An error has occurred in the script on this page
Line: LineNumber
Char: CharacterNumber
Error: Access is denied. (拒绝访问)
Code: 0
URL: URL
这是由于IE7在安全方面的设计变更,当用户按下鼠标的时候,代码中正在执行的window.moveTo()或window.resizeTo()将发生异常,拒绝访问。在微软的知识库中有详细的描述:http://support.microsoft.com/kb/942173/en-us (Error message when you try to move or resize a window on a computer that has Windows Internet Explorer 7 installed: "An error has occurred in the script on this page")
这个在IE6和IE8中也有可能发生,也就是说当js中的代码正好执行到window.moveTo()或window.resizeTo()时,接受到鼠标按下事件,此时就会发生error。可以使用一个循环try{}catch住这个异常,直到moveTo或resizeTo方法调用成功,只不过连续点击很多次可能会导致循环很多次,感觉像死机一样,不过最终还是会执行成功的。
- js中的moveTo与resizeTo发生Access is denied
- moveBy moveTo resizeBy() resizeTo()
- Access is denied: 'AjaxPro'
- Access is denied
- Error---Access is denied
- 550 Access is denied.
- js出现“Access is denied to PIE.htc”
- Cannot copy Access is Denied
- IPC Port 'Access is denied'
- FTP 550 Access is denied.
- mongodbexport出现Access is denied
- Nginx+php fastcgi 发生 Access Denied
- Nginx+php fastcgi 发生 Access Denied
- ASP.NET错误: Access is denied
- Parser Error Message: Access is denied
- ASP.NET ERROR: Access is denied
- Access to the path is denied. ------- .net
- Access to the registry key is denied
- Hibernate游标超值
- 传智播客——数据库之ORACLE(一)
- c#
- html file禁止输入
- 使用pager-taglib实现通用分页框架
- js中的moveTo与resizeTo发生Access is denied
- 聊天记录查询の.
- 初探数据结构----时间效率
- jacob问题
- 开源服务器监控软件
- 送别组长
- 传智播客——数据库之ORACLE(一)
- 五险一金
- 借鉴丰田方法对大型软件组织进行敏捷改造(上)