1、location对象
href属性:可以修改页面的href属性来实现页面跳转 更改的href属性:--- URL(统一资源定位符)
URI
方法:
定时刷新:reload()
2、举例
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>location</title>
<script type="text/javascript">
function testHref(){
window.location.href("广告页面.html");
}
function testRefresh(){
window.location.refresh();
}
</script>
</head>
<body>
<a href="06.广告页面.html">超链接</a>
<input type="button" value="跳转" οnclick="testHref"()/>;
<input type="button" value="定时刷新" οnclick="testRefresh()" />
</body>
</html>