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>