Common properties and methods of several important objects of the BOM

The location object

  • location.href location.assign () jump page
  • location.reload () to refresh the page
  • location.replace () Address replace the address bar
  • location.hash get back the contents of the address bar #
  • location.host obtain host information
  • location.hostname get hostname
  • location.protocal access agreement
  • location.search get? behind the content

history objects

  • history.back (); Back
  • history.forward (); Forward

navigator object

  • navigator.userAgent the server returns the value sent by the client user-agent header.
  • navigator.platform return to the operating system platform running the browser.

Guess you like

Origin www.cnblogs.com/liualexsone/p/11355505.html