Location:地址栏对象
作者:互联网
Location:地址栏对象
Location:地址栏对象
1,创建(获取):
window.location
locatlon
案例:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<input type="buttion" id="bin" value="刷新">
<script>
// 1,获取按钮
var bot =document.getElementById("bin")
bot.onclick = function (){
// 刷新页面
location.reload();
}
</script>
</body>
</html>
标签:对象,bot,获取,Location,地址栏,location 来源: https://www.cnblogs.com/ssr1/p/16557086.html