/**
* BOM
*
*
*
*
* Window
*
* Navigator
*
* Location
*
* History
*
* Srceen
*/
console.log(navigator);
console.log(location);
console.log(history);
/**
* Navigator
*
*
*
*/
//Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.72 Safari/537.36
//console.log(navigator.userAgent);
var ua = navigator.userAgent;
if(/firefox/i.test(ua)){
// alert('火狐');
console.log('火狐');
}else if(/chrome/i.test(ua)){
// alert('谷歌');
console.log('谷歌');
}else if(/msie/i.test(ua)){
console.log('ie');
}else if ('ActiveXObject' in window){
console.log('ie');
}
/**
* history
*
* 属性,可以获取到页面的访问量
*
*
*
* -可以用来跳转到指定页面
* -它需要一个整数来作为参数
* 1.正数往前跳
* 2.负数往后跳
*/
/**
* location
*
* 如果将location属性修改为一个完整的路径,或相对路径
* 则页面会自动跳转到该路径,并且会产生相应的历史记录
* assign()用来跳转到其他页面,作用和直接修改location一样
* reload
* replace
*/
console