1. The window each time loading window.location.reload () or tagged <meta http-equiv= "refresh" content= "1" > for one second automatically refresh, used in some real-time display of the site such as stocks.
2. Forward and backward, Window.history.forward () Window.history.back ()
3. After a few seconds auto-close, set a flag, and then add an event on the body to change the flag, if the event triggers the RESET flag
var true ; function Clickbody () { false; } Setinrerval (function() { if(willclose) {window.close ()}else true }},10000)
View Code
4. Modify the page title, Document.title = value.
5. Dynamic Loading JS,
function () { var thehead = Document.getelementbytagname (' head '). Item (0); var myScript = document.createelement (' script '); = ' = ' text/javascript ' true; After the set load is complete, parse execution }
View Code
6. Determine if the page is loaded, window.onload but the page load is complete including the load is complete, but we may need to complete the document loading, then use document onreadystatechange Monitoring
Document.onreadystatechange = myonload; function myonload () { if(document.readystate = = ' complete ') { alert (' document Loaded ') } }
View Code
JS Funciton Summary