location对象

 

location.reload() //刷新当前页面
location.href='http://www.baidu.com'" //进入新的链接

 

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<input type="button" value="重载" onclick="location.reload()">
<input type="button" value="重载" onclick="location.href='http://www.baidu.com'">

<script>

</script>
</body>
</html>

 

posted on 2017-12-30 17:18  JieFangZhe  阅读(108)  评论(0)    收藏  举报

导航