简单的文档对象的使用以及普通窗体的使用

来源:互联网 发布:#在mysql中的意思 编辑:程序博客网 时间:2024/06/05 01:07
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
 <head>
  <title>Untitled Document</title>
 </head>
 <body>
  <script type=text/javascript language=JavaScript>
   var wind;
   var statusStr=window.status;
   
   function openWindow(url)
   {
       alert(url);
    wind=document.open(url,"","width=400,height=300");
   }
   
   function closeWindow()
   {
    if(wind)
    {
     wind.close();
     wind=null;
    }
    else
    {
     alert("那你去洪波小老虎的博客找一找看有没有什么办法能把不存在的窗体关闭了?");
    }
    
   }
   
   function rollbackStatus()
   {
    window.status=statusStr;
   }
  </script>
  <input type="button" onclick="openWindow('http://blog.csdn.net/hongbo0521/');" value="打开窗口">
  <br>
  <input type="button" onclick="closeWindow()" value="关闭窗口">
  <br>
  <a href="http://blog.csdn.net/hongbo0521/" onmousemove="window.status='这里有很多你想要的东西';return true;" >
      洪波小老虎的博客
  </a>
   
  <br>但是我们发现状态栏的状态再也便不回来了 怎么办呢????
  
  <a href="http://blog.csdn.net/hongbo0521/" onmousemove="window.status='这里有很多你想要的东西';return true;"  onmouseout="rollbackStatus();return true">
       洪波小老虎的博客1
  </a>
  <br />看新的
 </body>
</html>
 
原创粉丝点击