如何识别浏览器的基本信息navigator
// navigator
const ua = navigator.userAgent
const isChrome = ua.indexOf('Chrome') > 0
console.log(isChrome)
浏览器宽度、高度 screen
//screen
console.log(screen.width)
console.log(screen.height)
浏览器url解析 location
//location
console.log(location.href)
console.log(location.protocol) //http: https:
console.log(location.pathname)
console.log(location.search)
console.log(location.hash)
浏览器 history
//history
history.back()
history.forward()