javascript(七)document.write

<h1>test</h1>

<button type="button" onclick="my_function">点击me</button>

 

<script>

  function  my_function(){

   document.write("糟了,页面不见了!")

 

}

</script>

 

 

说明:

使用document.write 将会使整个页面覆盖,

 

这里便可以做网页的跳转,估计可以跳转倒其他url,哈哈

 

posted on 2014-04-09 16:58  wangbokun  阅读(159)  评论(0编辑  收藏  举报

导航