


html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>JS-对象-BOM</title>
</head>
<body>
</body>
<script>
//获取
// window.alert("hello");
// alert("hello");
//方法
//confirm-对话框-- 确认: true 取消:false
// var flag=confirm("确认删除!");
// alert(flag);
// //定时器--setInterval--周期性的执行某一个函数
// var i=0;
// setInterval(function(){
// i++;
// console.log("定时器执行了"+i+"次");
// },2000);
//定时器-setTimeout --延迟指定时间执行一次
// setTimeout(function(){
// alert("JS");
// },3000)
//location
alert(location.href);
location.href="https://www.itcast.cn";
</script>
</html>