Objects in window and objects in events

Window object

All browsers support the  window  object. It represents a browser window.

All JavaScript global objects, functions, and variables are automatically members of the window object.

Global variables are properties of the window object.

Global functions are methods of the window object.

Even the HTML DOM's document is one of the properties of the window object:

window method:

  • window.open() - open a new window
  • window.close() - closes the current window
  • window.moveTo() - move the current window
  • window.resizeTo() - resize the current window

browser object

One: The browser itself has some objects, which can be used without creating

window: the current browser window

Attributes:

status

opener object representing parent form in child form

closed

method:

alert();

confirm();

setInterval(function(){

},100);

clearInterval();


setTimeout("aaa()",3000)

clearTimeout();


open();//Open a new window

document

frames

location

history

screen

...

[window.] member

document.write();

its own window

open can pop up subforms

frames multiple forms


Window:

document

location

    <meta http-equiv="refresh"content="3">

    <meta http-equiv="refresh"content="3";url=http://www.borphp.com">

header("Location:login.php");

window.navigate('url')

location.href='url'

loction.replace('url')

remember:

location='url'

location.reload(true);

history

 history.back();

 history.go(-2)

screen

with(document){

write("Your screen display settings are as follows: <p>");

write("The actual height of the screen is", screen.availHeight, "<BR>");

write("The actual width of the screen is", screen.availWidth, "<BR>");

write("The color wheel depth of the screen is ", screen.colorDepth, "<BR>");

write("The height of the screen area is ", screen.height, "<BR>");

write("The width of the screen area is", screen.width);

}

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325645109&siteId=291194637