Internet Explorer cannot open the Internet site,Operation
aborted。
起因是写了个服务器断控件,该控件需要在前端生成一个控制该控件的对象.使用IE6.0和IE7.0都会报这样的错误,换成IE8.0或FIREFOX就可以了.
当时采用直接往客户端注册javascript代码的方式:
<script>
var
jsxxx;
var c;
jsxxx.xxx =
'123';
appendCtrl(jsxxx)
</script>
在这里使用了一个包装过的方法,就是把这个控件append到document.body上去,这时就出现了这个问题.
最后发现只要把这段js代码放到</html>的后面,就能正常运行.
所以推测错误是这样引起的:
控件在生成的过程中,因为js代码的原因,就在body还没有生成完成的时候
(还没有生成</body>),就运行了该段js代码,导致document无法找到完整的body,所以报错.
解决方法:
往前端注册一个函数
<script>
var
jsxxx;
var c;
var xxx = function () {
jsxxx.xxx = '123';
appendCtrl(jsxxx)
}
window.attachEvent('onload',
xxx);
</script>
然后将这个函数附加到window.onload事件中,问题解决.
分享到:
相关推荐
在IE6浏览器中,用户可能会遇到“Internet Explorer cannot open the Internet site”的错误,尤其是在页面尚未完全加载时,尝试执行一个生成iframe的脚本事件。这个问题的根源在于IE6对DOM操作的特定处理方式,以及...
在一个aspx页面中使用了JQuery,但当IE6浏览器打开这个页面的时候会报“Internet Explorer cannot open the Internet site http://localhost:9001/Index.aspx. Operation aborted”的错误,然后就不能正常浏览此页面...
You cannot sort the attachments according to the column you choose with /sort command-line option. * Version 2.30 o Added 'Domain' column, which displays the domain of the from/to email address. ...
Open the project using Visual Studio, and in Solution Explorer, expand the References node. Delete the reference to System.Web.Mvc (which points to the version 1.0 assembly). Add a reference to ...
and plays a WAV file<END><br>52 , urlhist.zip This sample demonstrates how to loop through the history folder of Internet Explorer.<END><br>53 , AdvancedWebBrowser.zip Advanced web browser.....
It also has an example of how to change a label control to a 3D command button.<END><br>42 , splitpanel2.zip A re-written version of the SplitPanel that David originally put onto this site about a...