<html>
<head>
<title>BOM</title>
<meta charset="utf-8">
<style>
</style>
</head>
<body>
<P>知识点:navigator location screen history</P>
<p> navigator:识别浏览器类型</p>
<p></p>
<h5></h5>
<p></p>
<p></p>
<h4></h4>
<p></p>
<p></p>
</body>
</html>
<script src="../js/jquery.min.js"></script>
<script>
let ua=navigator.userAgent; //浏览器类型
console.log(ua)
const isChrome=ua.indexOf('Chrome')
console.log(isChrome)
console.log(screen.height)
console.log(screen.width)
//history
console.log(location.href)//全地址 eg http://www.baidu.com/hw/h4.html?aa=admin#djfajfj
console.log(location.protocol);//协议 http/https
console.log(location.pathname);///hw
console.log(location.search);//参数 ?aa=admin
console.log(location.host);//www.baidu.com
console.log(location.hash);//#djfafj
history.back()//浏览器后退
history.forward();//浏览器前进
</script>