<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无刷新弹出提示</title>
<script language="javascript" src="http://hi.baidu.com/js/popup.js"></script>
</head>
<body>
<script language="javascript"> 
function editPhotoCat(url)
{
    var pop=new Popup({ contentType:1, isReloadOnClose:false, width:530, height:230 });
    pop.setContent("title","编辑相册");
    pop.setContent("contentUrl",url);
    pop.build();
    pop.show();
    return false;
}
</script><a href="#" onClick="editPhotoCat('6.htm');return false;">3秒自动关闭窗口</a>
  
</body>
</html>

解决方案 »

  1.   


       <script type="text/javascript">
      var i=3;
      function close_win(){
         self.opener=null;
     self.close();
         
      }
      function clock(){
        i=i-1;
    document.title="本窗口将在"+i+"秒后自动关闭!";
    if(i>0) setTimeout("clock()",1000);
    else close_win();
      }
      clock();
    </script>