“internet explore 無法打開internet站點(diǎn) 已終止操作”的解決方法
更新時(shí)間:2008年04月12日 23:50:35 作者:
在IE下,當(dāng)頁面還沒有加載完全時(shí),如果正在執(zhí)行的JS代碼中含有使用了document.createElement的話,很容易引起頁面加載失敗.導(dǎo)致提示"internet explore 無法打開internet站點(diǎn) http://www.xxx.com/xxx/xxx.html 已終止操作".
這是因?yàn)?
在IE下,在加載文檔的過程中,整個(gè)HTML文檔的DOM結(jié)構(gòu)尚未生成完整,而此時(shí)正在執(zhí)行的JS就已創(chuàng)建出新的DOM結(jié)點(diǎn)了,致使DOM樹的結(jié)構(gòu)發(fā)生紊亂.
易出錯(cuò)寫法:
復(fù)制代碼 代碼如下:
<html>
<head>
<title> xxxxxxxxxxxx </title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="author" content="楓巖,CNLEI" />
<meta name="copyright" content="cnlei.y.l@gmail.com , http://www.cnlei.com" />
<meta name="keywords" content="" />
<meta name="description" content="" />
</head>
<body>
xxxxxxxxxxxxxxxxxx
<script type="text/javascript">
<!--
(function init(){
$WIN().create({//創(chuàng)建復(fù)雜HTML結(jié)構(gòu)
id:"lWindow_Reg",
title:"注冊(cè)新用戶",
type :"AJAX",
innerHTML:'ex_reg.html'
},{
top:"50px",
left:"270px",
width:"560px"
});
})();
-->
</script>
xxxxxxxxxxxxxxxxxx
</body>
</html>
解決方法:
復(fù)制代碼 代碼如下:
<html>
<head>
<title> xxxxxxxxxxxx </title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="author" content="楓巖,CNLEI" />
<meta name="copyright" content="cnlei.y.l@gmail.com , http://www.cnlei.com" />
<meta name="keywords" content="" />
<meta name="description" content="" />
</head>
<body>
xxxxxxxxxxxxxxxxxx
<script type="text/javascript">
<!--
(function(){
function init(){
$WIN().create({//創(chuàng)建復(fù)雜的HTML結(jié)構(gòu)
id:"lWindow_Reg",
title:"注冊(cè)新用戶",
type :"AJAX",
innerHTML:'ex_reg.html'
},{
top:"50px",
left:"270px",
width:"560px"
});
};
if(!DWS.BV.isIE){//非IE瀏覽器直接初始化
init();
} else {
//IE下,防止瀏覽器提示“internet explore 無法打開internet站點(diǎn) 已終止操作”
if (document.readyState=="complete"){
init();
} else {
document.onreadystatechange=function(){
if(document.readyState=="complete")init();
}
}
}
})();
-->
</script>
xxxxxxxxxxxxxxxxxx
</body>
</html>
相關(guān)文章
HTTP 錯(cuò)誤 401.1 - 未經(jīng)授權(quán):訪問由于憑據(jù)無效被拒絕的解決方法
服務(wù)器上所有站點(diǎn)都顯示 未經(jīng)授權(quán):訪問由于憑據(jù)無效被拒絕找下了應(yīng)該是用戶有效時(shí)間問題2008-06-06
LBS BLOG在IE7下圖片出現(xiàn)滾動(dòng)條的解決方法
LBS BLOG在IE7下圖片出現(xiàn)滾動(dòng)條的解決方法...2006-12-12
資料:數(shù)據(jù)恢復(fù)知識(shí)基礎(chǔ)
資料:數(shù)據(jù)恢復(fù)知識(shí)基礎(chǔ)...2007-01-01
最新版本的動(dòng)易+動(dòng)網(wǎng)+oBlog三站整合方法
最新版本的動(dòng)易+動(dòng)網(wǎng)+oBlog三站整合方法...2007-04-04

