题目
- 如何识别浏览器的类型
- 如何拆解url各个部分
navigator
const ua = navigator.userAgent
ua.indexOf('Chrome') // 无法准确确定是何种浏览器
screen
screen.width
screen.height
location
location.href
location.protocol
location.host
location.search // ?xxxx=xxx
location.hash // #xx
location.pathname // 除去域名:端口
history
history.back()
history.forward()