The BOM of JS regression

Source: Internet
Author: User

WINDOW:
================================================
Window Page Area Width height
var w=window.innerwidth| | document.documentelement.clientwidth| | Document.body.clientwidth;var h=window.innerheight| | document.documentelement.clientheight| | Document.body.clientHeight;

Screen available with wide height screen.availwidth,availheight
Urllocation:
Window Location

The Window.location object can be written without using the window prefix.

Some examples:

    • Location.hostname returns the domain name of the web host
    • Location.pathname returns the path and file name of the current page
    • Location.port returns the port of the web host (80 or 443)
    • Location.protocol returns the Web protocol used (HTTP///https://)
    • Location.href return URL
    • Location.assign () method to load a new document

History

    • History.back ()-Same as clicking Back button in browser
    • History.forward ()-Same as clicking the button in the browser forward

Navigator: A misleading trait that we leave aside for the moment

message box:

Alert () Prompt box

Confirm (t/f)

Prompt (Value/null)

Timer:

This is the basic question that the interview basically asks.

SetTimeout cleartimeout

Feature: One call at a time in the future

If you want to fantasy, you must constantly call yourself

The BOM of JS regression

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.