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>
最后
以上就是漂亮外套最近收集整理的关于Java语言-91:location对象的全部内容,更多相关Java语言-91内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复