location.assign() 方法加载新的文档

<html>
<head>
<script>
function newDoc()
  {
  window.location.assign(http://www.baidu.com.cn)
  }
</script>
</head>
<body>

<input type="button" value="加载新文档" onclick="newDoc()">

</body>
</html>

 

posted @ 2013-08-15 09:22  玉伽  阅读(718)  评论(0编辑  收藏  举报