BOM相关
-
浏览器内核
-
Chrome-blink
-
safari-webkit
-
IE-trident
-
Firefox -Gecko
-
-
localstorage 、sessionstorage和 cookie 区别
参考
https://www.jianshu.com/writer#/notebooks/35098404/notes/44370961
-
BOM(浏览器对象模型)
-
navigator
用来判断浏览器类型
-
screen
获取浏览器长宽
-
location
获得 URL,可以拆解
举个栗子var URL = 'http://localhost:8080/index.html#text?q=test'; console.log(location.hash);//#text?q=test console.log(location.host);//localhost:8080 console.log(location.hostname);//localhost console.log(location.href);//http://localhost:8080/index.html#text?q=test console.log(location.pathname);///index.html console.log(location.port);//8080 console.log(location.protocol);//http: console.log(location.search);'' var URL = 'http://localhost:8080/index.html?q=test#text'; console.log(location.hash);//#text console.log(location.search);//?q=test
search 方法只能取出?后面#前面的值
-
history
-
网友评论