Js--bom object: Borswer Object Model Explorer

Source: Internet
Author: User

BOM object: Borswer Object Model Explorer
Navigator getting the client's information (browser information)
Navigator.appname; Get the name of the browser

window: Windows object
alert (); pop-up box
Confirm (msg); confirmation box
Prompt (hint message, defaulttext): Input Box
Open ("Opened new window address URL", "", "window features, such as window width and height");
window.open ("hello.html", "" "," width=200,height=100 ");
Close (); Closing window compatibility is poor
Do timer use
*setinterval ("JS code", milliseconds); 1 seconds =1000 milliseconds
Window.setinterval ("alert (a)", 3000), the JS method is executed every 3 seconds

*settimeout ("JS Code", number of milliseconds), executed after the specified number of milliseconds, but only once
SetTimeOut ("alert (' abc ')", 3000); Indicates that the alert method is executed after 3 seconds

*clearinterval (Id_of_setinterval): Clears the SetInterval set timer
*cleartimeout (id_of_settimeout): Clears the SetTimeOut set timer
Screen: Get information about the screens
Screen.width; Get the width of the screen
Screen.height: Get high on the screen

Location: Request URL Address
location.href; Gets the URL address of the current request
Location.href= ""; Set the URL address of the request

History: The historical record of the requested URL
To the previous page of the visit
History.back ();
History.go (-1);
To the next page of the visit
History.forward ();
History.go (1);

Js--bom object: Borswer Object Model Explorer

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.