ECMAScript versions are compatible, but lower than the version is not compatible ES6
BOM and DOM is a tree structure
BOM is the root window, is the root of the DOM document
BOM contains: document (document), location (local information), history (history), screen (the screen), navigator (browser information)
window.open (); window.close (); for pop, now substantially blocked.
window.innerWidth, width and height window.innerHeight browser, comprising a scrollbar width, height is the height of the document (the height of the display).
window.outerWidth, width and height window.outerHeight browser, the width of the scroll bar comprising, if the non-full-screen, the width of the hatched portion comprises a height browser always height.
window.screenLeft, window.screenRight distance from the top left corner of the browser screen, can not be set, only to get. It is equivalent to (screenX, screenY)
window.location.reload () reload the page
location.href = "http://www.163.com"; // href get the current page address, you can also set the current page address, to jump page, generate history
location.assign ( "http: // www. 163.com "); // can only jump page, you can produce a record
location.replace (" http://www.163.com "); // replace the current page, jump page, can not produce history
console.log (location.hash); // get behind the anchor name # and contents
console.log (location.search);? // and the following content
console.log (location.hostname);
console.log (location.port);
console.log (location.pathname); // In addition to the domain name and current address path other than the port number
console.log (location.protocol); // protocol
history.go (0); // refresh the page
history.go (1); // want before a
history.go (-1); // a rearwardly
history.pushState (state, title, url); // refresh your browser does not change url
screen screen
console.log (screen.availWidth, screen.availHeight); // removes the task bar width and height
console.log (screen.width, screen.height); // full screen width and height
console.log (navigator.userAgent); // obtain browser information
console.log (navigator.platform); // distinguish operating system