BOM的location对象

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>location对象</title>
</head>
<body>
<!--1.location.reload() 起到刷新的作用-->
<input type="button" value="reload" onclick="location.reload()">
<!--2.location.href与a标签作用一样,链接URL-->
<input type="button" value="href" onclick="location.href='http://www.baidu.com'">
<script>

</script>

</body>
</html>
posted @ 2020-01-31 22:37  Stary_tx  阅读(181)  评论(0)    收藏  举报