<! Doctype HTML public "-// W3C // dtd xhtml 1.0 transitional // en" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <br/> <HTML xmlns = "http://www.w3.org/1999/xhtml"> <br/> <pead> <br/> <meta http-equiv = "Content-Type" content = "text/html; charset = gb2312 "/> <br/> <title> JS internal object (window, Navigator) </title> <br/> </pead> </P> <p> <body> <br/> <MCE: Script Type = "text/JavaScript"> <! -- <Br/> document. write ("window. navigator ----------------------------- <br> "); <br/> document. write ("browser name:" + navigator. appname + "<br>"); <br/> document. write ("browser version:" + navigator. appversion + "<br>"); <br/> document. write ("the name of the browser code is:" + navigator. appcodename + "<br>"); <br/> document. write ("User Agent ID:" + navigator. useragent + "<br>"); <br/> document. write ("available mine type information:" + navigator. minetypes + "<br>"); <br/> document. WR ITE ("available plug-ins:" + navigator. plugins + "<br>"); <br/> document. write ("language:" + navigator. ages + "<br>"); <br/> document. write ("window object attributes -------------------------------- <br>"); <br/> document. write ("your invalid Doc ument:" Your invalid Doc ument + "<br>"); <br/> document. write ("window. location: "+ window. location + "<br>"); <br/> document. write ("window. history: "+ window. history + "<br>"); <br/> document. write ("window. clo Sed: "+ window. closed + "<br>"); <br/> document. write ("window. opener: "+ window. opener + "<br>"); <br/> document. write ("window. SELF: "+ window. self + "<br>"); <br/> document. write ("window. top: "+ window. top + "<br>"); <br/> document. write ("window. parent: "+ window. parent + "<br>"); <br/> document. write ("window. frames: "+ window. frames + "<br>"); <br/> document. write ("window. length: "+ window. length + "<br>"); <br/> document. write (" Window. offscreenbuffering: "+ window. offscreenbuffering + "<br> "); <br/>/* <br/> information about the current file of the document <br/> location information about the current URL <br/> name window name <br/> temporary information about the status bar <br/> defaultstatus <br/> history the page recently viewed in this window <br/> closed checks whether the window is closed, returns a Boolean value. <br/> the source window of the window opened by the opener open method <br/> the vertical size of the outerheight window boundary. px ie does not support this attribute, there is no alternative property. <Br/> horizontal size of the outerwidth window boundary. px ie does not support this attribute and does not provide an alternative attribute. <Br/> position of X-position on the pagexoffset webpage <br/> position of Y-position on the pageyoffset webpage <br/> vertical size of the content area of the innerheight window, px <br/> horizontal size of the innerwidth window content area, px <br/> X coordinate of the left boundary of the screenx window <br/> Y coordinate of the upper boundary of the screeny window <br/> self current window <br/> top window <br/> parent current window or framework group <br/> frames corresponds to the number of frames in the window <br/> length framework <br/> address bar of the locationbar browser <br/> menubar Browser menu Bar <br/> scrollbars browser scroll bar <br/> statusbar browser status bar <br/> toolbar browser toolbar <br/> offscreenbuffering Whether to update the area outside the window <br/> personal Toolbar of the personalbars browser, only navigator <br/> */<br/> var dlk = "dialog box "; <br/> var timestr <br/> var zdtime =/^ [0-9] {1,100 }$/<br/> // --> </MCE: SCRIPT> <br/> <Form ID = "form1" name = "form1" method = "Post" Action = ""> <br/> open/close <br/> <br/> <input type = "button" name = "Submit" value = "open a new window" onclick = "open('execcommand.html ', 'New Windows', 'toolbar = false, location = false, ctions = false, status = false, menubar = false, SC Rollbar = false, revisable = false, width = 600, Height = 400, Top = 100, Left = 100 ') "/> <br/> <! -- <Br/> whether alwayslowered pushes the stack displayed in the window to a layer <br/> whether alwaysraised pushes the stack displayed in the window to a layer <br/> whether the dependent pushes the window to the current window dependency generation <br/> fullscreen full screen display <br/> directories display connection toolbar <br/> location display URL toolbar <br/> menubar display menu toolbar <br/> whether scrollbars displays the scroll bar <br/> whether the status bar displays the status bar <br/> whether the titlebar displays the title bar <br/> whether the toolbar displays the Standard toolbar <br/> whether resizable can be changed window Size <br/> screenx window left boundary distance <br/> screeny window top boundary distance <br/> top window top boundary <br/> width window width <br/> height Window height <br/> left border of the window <br/> outerheight height of the outer border of the window <br/> whether the personal toolbar is displayed on the personalbar <br/> --> <br/> <Input type = "button" name = "submit2" value = "close" onclick = "window. close () "/> <br/> dialog box <br/> <input type = "button" name = "submit4" value = "message input" onclick = "dlk = prompt ('Dialog box ', 'enter some information:') "/> <br/> <input type =" button "name =" submit3 "value =" pop-up information "onclick =" alert (dlk) "/> <br/> <input type =" Ton "name =" submit1 "value =" Restore Default information "onclick =" If (confirm ('Restore default information') dlk = 'dialog box '; "/> <br/> setTimeout/setinterval <br/> </P> <p> <input type = "button" name = "submit3" value = "display time" onclick = "settime (); "/> <br/> <input type =" button "name =" submit3 "value =" stop time 1 "onclick =" cleartimeout (timer ); "/> <br/> <input type =" text "name =" textfield "value =" "/> setTimeout <br/> <input type =" Bu Tton "name =" submit3 "value =" start timing "onclick =" timer1 = setinterval ('settime1 () ', 1000 ); "/> <br/> <input type =" button "name =" submit3 "value =" stop time 2 "onclick =" clearinterval (timer1 ); "/> <br/> <input type =" text "name =" textfield1 "value =" "/> setinterval <br/> move/ adjust <br/> move <br/> <input type = "text" name = "MB" value = ""/> <br/> <! -- JS provides parseint () and parsefloat () --> <br/> <input type = "button" name = "submit3" value = "Start vibration" onclick = "If (zdtime. test (document. form1.mb. value) {Zhendong (parseint (document. form1.mb. value);} else Zhendong (5 ); "/> moveBy <br/> x <input name =" X "type =" text "value =" "size =" 3 "maxlength =" 4 "/> Y <input name = "Y" type = "text" value = "" size = "3" maxlength = "4"/> <input type = "button" name =" submit3 "value =" mobile "onc Lick = "moveTo (parseint (document. form1.x. value), parseint (document. form1.y. value )) "/> <br/> moveTo <br/> adjustment <br/> x <input name =" X1 "type =" text "value =" "size =" 3 "maxlength =" 4 "/> Y <input name =" Y1 "type =" text "value =" "size =" 3" maxlength = "4"/> <input type = "button" name = "submit3" value = "Adjust XY" onclick = "resizeBy (-parseint (document. form1.x1. value),-parseint (document. form1.y1. value) "/> <br /> ResizeBy <br/> x <input name = "X2" type = "text" value = "" size = "3" maxlength = "4"/> Y <input name = "Y2" type = "text" value = "" size = "3" maxlength = "4"/> <input type = "button" name = "submit3 "value =" adjusted to "onclick =" resizeTo (parseint (document. form1.x2. value), parseint (document. form1.y2. value) "/> <br/> resizeTo <br/> <! -- <Input type = "button" name = "submit3" value = "Move the scroll bar up to 10 pixels" onclick = "window. scrollby (); "/> --> <br/> <input type =" button "name =" submit3 "value =" Move the scroll bar to 0, 0 "onclick =" window. scrollto (0, 0); "/> <br/> <input type =" button "name =" submit3 "value =" print "onclick =" window. print (); "/> <br/> <! -- <Br/> <input type = "button" name = "submit3" value = "" onclick = "try {back (1);} catch (E) {alert ('Do not back')} "/> <br/> <! -- <Br/> window. open the command to pop up a new window. <br/> the file name of the 'page.html 'pop-up window. <br/> The Name Of The 'newwindow' pop-up window (not the file name) is optional, can be replaced by null ''; <br/> Height = 100 window height; <br/> width = 400 window width; <br/> Top = the pixel value between the 0 window and the top of the screen; <br/> left = the pixel value between the 0 window and the left of the screen; <br/> toolbar = No indicates whether to display the toolbar. Yes indicates display. <br/> menubar and scrollbars indicate the menu bar and scroll bar. <Br/> resizable = No: whether to change the window size; yes: Yes; <br/> location = No: whether to display the address bar; yes: Yes; <br/> Status = No indicates whether information in the status bar is displayed (usually the file has been opened ), yes is allowed <br/> --> <br/> </form> <br/> <MCE: Script Type = "text/JavaScript"> <! -- <Br/> timer1 = setinterval ("settime1 ()", 1000) <br/> function settime1 () {<br/> var now1 = new date (); <br/> document. form1.textfield1. value = now1.tolocalestring (); <br/>}< br/> function settime () {<br/> timer = setTimeout ("settime ()", 1000 ); <br/> var now = new date (); <br/> document. form1.textfield. value = now. tolocalestring (); <br/>}< br/> function Zhendong (n) {<br/> for (I = 10; I> 0; I --) {<br/> for (j = N; j> 0; j --) {<br/> window. moveBy (0, I); <br/> window. moveBy (I, 0); <br/> window. moveBy (0,-I); <br/> window. moveBy (-I, 0); <br/>}< br/> // --> </MCE: SCRIPT> <br/> </body> <br/> </ptml> <br/>