亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

“internet explore 無(wú)法打開(kāi)internet站點(diǎn) 已終止操作”的解決方法

 更新時(shí)間:2008年04月12日 23:50:35   作者:  
在IE下,當(dāng)頁(yè)面還沒(méi)有加載完全時(shí),如果正在執(zhí)行的JS代碼中含有使用了document.createElement的話,很容易引起頁(yè)面加載失敗.導(dǎo)致提示"internet explore 無(wú)法打開(kāi)internet站點(diǎn) http://www.xxx.com/xxx/xxx.html 已終止操作".

這是因?yàn)?
在IE下,在加載文檔的過(guò)程中,整個(gè)HTML文檔的DOM結(jié)構(gòu)尚未生成完整,而此時(shí)正在執(zhí)行的JS就已創(chuàng)建出新的DOM結(jié)點(diǎn)了,致使DOM樹(shù)的結(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 無(wú)法打開(kāi)internet站點(diǎn) 已終止操作” 
    if (document.readyState=="complete"){ 
      init(); 
    } else { 
      document.onreadystatechange=function(){ 
        if(document.readyState=="complete")init(); 
      } 
    } 
  } 
})(); 
--> 
</script> 
xxxxxxxxxxxxxxxxxx 
</body> 
</html> 

相關(guān)文章

最新評(píng)論