BOM and new object is window, he represents an instance of the rover, as a global object, have access to parseint () and other methods
Variables declared in the global scope, functions have the money to access
var a=; function Sayname () { console.log ("Name"); } Console.log (window.a,a); Window.sayname ();
Variables that have been defined globally cannot be deleted, but can be deleted in WINDOW.A definition
var a=; window.b=+; Delete A; Delete window.b; Console.log (A, b);
Window relationships and Frames
window.frames[0,1,2,,,,]
Window.frames[name]
frames[0,1,2,,,]
Frames[name]
<frameset rows= "160,*" ><frame src= "frame.htm" name= "Topframe" ><frameset cols= "50%,50%" ><frame Src= "anotherframe.htm" name= "Leftframe" ><frame src= "yetanotherframe.htm" name= "RightFrame" ></frameset ></frameset>
Window position
Console.log (Window.screenleft,window.screentop,window.screenx,window.screeny);
Code for two mobile Windows (as if all were disabled
Window.moveto (A, B) Window.moveby (A, B)
Window position
Console.log (Window.innerwidth,window.outerwidth,window.innerwidth,window.outerwidth);
Adjust window size (Google and Firefox are banned
Window.resizeto (100,100); Window.resizeby (100,100);
Timeout call (suggested write function
var a=settimeout (function () { alert ("fuck"); },3000);
Intermittent calls
var a=setinterval (function () { alert ("fuck"); },3000 );
System dialog box
Confirm (a) A is a representative asking you that sentence
if (Confirm ("Fuck OK??") ) { alert ("thx"); } Else { alert ("Fuck You"); }
Prompt (A, b) A is a representative asking you, a representative for you to fill some, if you turn off or point no
var a=prompt ("What ' s Your Name", "Ken"); if (a!==null) { alert ("Welcome " +a); }
Window Object BOM