<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>location对象</title>
<!--
location有一个属性:
href:执行当前href指定的url链接
-->
<script>
function testLocation(){
/* 当前窗口直接打开*/
window.location.href="定时显示和隐藏广告.html"
}
</script>
</head>
<body>
<input type="button" value="location" onclick="testLocation()"/>
</body>
</html>
BOM之location对象
最新推荐文章于 2024-01-25 13:46:34 发布