- Window object
- Defined:
- A browser window instance
- Window-related information (Application programming Interface)
- Global objects specified by ECMAScript
- Method
- Open (URL), which returns an identifier reference to the window that is about to open. ( the Close method of the referenced object is called to close the window )
Intermittent Call setinterval(function,time). clearinterval ()
Timeout Call setTimeout(function,time); indicates how long after the code is injected into the message queue (if the queue is empty then it executes immediately, otherwise wait for the previous code to execute before executing) cleartimeout()
System dialog box
Alert (String)
Confirm(text indicating the hint); return true/false
Prompt (prompt text message, type the text in advance); returns the input information or null
- Location Object
- Defined:
Holds information about the current document.
will be URLs are parsed into separate fragments for easy access by developers.
window.location = = = Document.location
Method
Location.assign(new URL), opens a new URL, and creates a new record in the record
Location.reload(true/false): Refreshes the current page .
Location.replace(URL): Replaces the URLof the current record with the incoming URL , and does not create a new record in the record.
window.location = new URL,location.href = new URL and location.assign(new URL) effect
- Properties
href: full URL
Host: Hosts or domain names
Hostname: Returns the host or domain name without a port number.
Pathname: returns the directory and file name in the URL.
Hash: returns the hash value (' #target ')
Search: Returns the query string ('? name=fafa&sex= "Mae")
- History Object
Definition: Stores the history of the user's Internet access.
Method:
- Go (digital)
- Number: number -1 page back one record,+1 forward a record
- Back (): Rewind a record
- Forward (): forward a record
Common BOM objects (properties, methods) in JavaScript