⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dom_obj_window.asp@output=print

📁 W3Schools tutorial..web designing
💻 ASP@OUTPUT=PRINT
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en-US" xml:lang="en-US" xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>HTML DOM Window Object</title>
 
<link rel="shortcut icon" href="../favicon.ico" type="image/x-icon" />
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<meta name="Keywords" content="xml,tutorial,html,dhtml,css,xsl,xhtml,javascript,asp,ado,vbscript,dom,sql,colors,soap,php,authoring,programming,training,learning,beginner's guide,primer,lessons,school,howto,reference,examples,samples,source code,tags,demos,tips,links,FAQ,tag list,forms,frames,color table,w3c,cascading style sheets,active server pages,dynamic html,internet,database,development,Web building,Webmaster,html guide" />

<meta name="Description" content="Free HTML XHTML CSS JavaScript DHTML XML DOM XSL XSLT RSS AJAX ASP ADO PHP SQL tutorials, references, examples for web building." />

<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="cache-control" content="no-cache" />

<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "../../https@ssl./default.htm" : "../../www./default.htm");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-3855518-1");
pageTracker._initData();
pageTracker._trackPageview();
</script>

</head>
<body>

<p>From <b>http://www.w3schools.com</b> (Copyright Refsnes Data)</p>

<h1>HTML DOM Window Object</h1>
<hr />

<h2>Window Object</h2>
<p>The Window object is the top level object in the JavaScript hierarchy.</p>
<p>The Window object represents a browser window.</p>
<p>A Window object is created automatically with every instance 
of a &lt;body&gt; or &lt;frameset&gt; tag.</p>

<p><b>IE:</b> Internet Explorer, <b>F:</b> Firefox, <b>O:</b> Opera.</p>

<h3>Window Object Collections</h3>
<table class="ex" cellspacing="0" border="1" width="100%">
  <tr>
    <th width="20%" align="left">Collection</th>
    <th width="60%" align="left">Description</th>
    <th width="5%" align="left">IE</th>
    <th width="4%" align="left">F</th>
    <th width="4%" align="left">O</th>
  </tr>
  <tr>
    <td valign="top">frames[]</td>
    <td valign="top">Returns all named frames in the window</td>
    <td valign="top">4</td>
    <td valign="top">1</td>
    <td valign="top">9</td>
  </tr>
  </table>

<h3>Window Object Properties</h3>

<table class="ex" cellspacing="0" border="1" width="100%">
  <tr>
    <th width="20%" align="left">Property</th>
    <th width="60%" align="left">Description</th>
    <th width="5%" align="left">IE&nbsp;</th>
    <th width="4%" align="left">F</th>
    <th width="4%" align="left">O</th>
  </tr>
  <tr>
    <td valign="top"><a href="prop_win_closed.asp">closed</a></td>
    <td valign="top">Returns whether or not a window has been closed</td>
    <td valign="top">4</td>
    <td valign="top">1</td>
    <td valign="top">9</td>
  </tr>
  <tr>
    <td valign="top"><a href="prop_win_defaultstatus.asp">defaultStatus</a></td>
    <td valign="top">Sets or returns the default text in the statusbar of the 
	window</td>
    <td valign="top">4</td>
    <td valign="top">No</td>
    <td valign="top">9</td>
  </tr>
  <tr>
    <td valign="top"><a href="dom_obj_document.asp">document</a></td>
    <td valign="top"><a href="dom_obj_document.asp">See Document object</a></td>
    <td valign="top">4</td>
    <td valign="top">1</td>
    <td valign="top">9</td>
  </tr>
  <tr>
    <td valign="top"><a href="dom_obj_history.asp">history</a></td>
    <td valign="top"><a href="dom_obj_history.asp">See History object</a></td>
    <td valign="top">4</td>
    <td valign="top">1</td>
    <td valign="top">9</td>
  </tr>
  <tr>
    <td valign="top">length</td>
    <td valign="top">Sets or returns the number of frames in the window</td>
    <td valign="top">4</td>
    <td valign="top">1</td>
    <td valign="top">9</td>
  </tr>
  <tr>
    <td valign="top"><a href="dom_obj_location.asp">location</a></td>
    <td valign="top"><a href="dom_obj_location.asp">See Location object</a></td>
    <td valign="top">4</td>
    <td valign="top">1</td>
    <td valign="top">9</td>
  </tr>
  <tr>
    <td valign="top"><a href="prop_win_name.asp">name</a></td>
    <td valign="top">Sets or returns the name of the window</td>
    <td valign="top">4</td>
    <td valign="top">1</td>
    <td valign="top">9</td>
  </tr>
  <tr>
    <td valign="top"><a href="prop_win_opener.asp">opener</a></td>
    <td valign="top">Returns a reference to the window that created the 
    window</td>
    <td valign="top">4</td>
    <td valign="top">1</td>
    <td valign="top">9</td>
  </tr>
  <tr>
    <td valign="top"><a href="prop_win_outerheight.asp">outerheight</a></td>
    <td valign="top">Sets or returns the outer height of a window</td>
    <td valign="top">No</td>
    <td valign="top">No</td>
    <td valign="top">No</td>
  </tr>
  <tr>
    <td valign="top"><a href="prop_win_outerwidth.asp">outerwidth</a></td>
    <td valign="top">Sets or returns the outer width of a window</td>
    <td valign="top">No</td>
    <td valign="top">No</td>
    <td valign="top">No</td>
  </tr>
  <tr>
    <td valign="top">pageXOffset</td>
    <td valign="top">Sets or returns the X position of the current page in 
	relation to the upper left corner of a window's display area</td>
    <td valign="top">No</td>
    <td valign="top">No</td>
    <td valign="top">No</td>
  </tr>
  <tr>
    <td valign="top">pageYOffset</td>
    <td valign="top">Sets or returns the Y position of the current page in 
	relation to the upper left corner of a window's display area</td>
    <td valign="top">No</td>
    <td valign="top">No</td>
    <td valign="top">No</td>
  </tr>
  <tr>
    <td valign="top">parent</td>
    <td valign="top">Returns the parent window</td>
    <td valign="top">4</td>
    <td valign="top">1</td>
    <td valign="top">9</td>
  </tr>
  <tr>
    <td valign="top">personalbar</td>
    <td valign="top">Sets whether or not the browser's personal bar (or directories bar) 
	should be visible</td>
    <td valign="top">&nbsp;</td>
    <td valign="top">&nbsp;</td>
    <td valign="top">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top">scrollbars</td>
    <td valign="top">Sets whether or not the scrollbars should be 
	visible</td>
    <td valign="top">&nbsp;</td>
    <td valign="top">&nbsp;</td>
    <td valign="top">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top"><a href="prop_win_self.asp">self</a></td>
    <td valign="top">Returns a reference to the current window</td>
    <td valign="top">4</td>
    <td valign="top">1</td>
    <td valign="top">9</td>
  </tr>
  <tr>
    <td valign="top"><a href="prop_win_status.asp">status</a></td>
    <td valign="top">Sets the text in the statusbar of a window</td>
    <td valign="top">4</td>
    <td valign="top">No</td>
    <td valign="top">9</td>
  </tr>
  <tr>
    <td valign="top">statusbar</td>
    <td valign="top">Sets whether or not the browser's statusbar should be 
	visible</td>
    <td valign="top">&nbsp;</td>
    <td valign="top">&nbsp;</td>
    <td valign="top">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top">toolbar</td>
    <td valign="top">Sets whether or not the browser's tool bar is visible or 
	not (can only be set before the window is opened and you must have 
	UniversalBrowserWrite privilege)</td>
    <td valign="top">&nbsp;</td>
    <td valign="top">&nbsp;</td>
    <td valign="top">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top"><a href="prop_win_top.asp">top</a></td>
    <td valign="top">Returns the topmost ancestor window</td>
    <td valign="top">4</td>
    <td valign="top">1</td>
    <td valign="top">9</td>
  </tr>
  </table>

<h3>Window Object Methods</h3>

<table class="ex" cellspacing="0" border="1" width="100%">
  <tr>
    <th width="20%" align="left" valign="top">Method</th>
    <th width="60%" align="left" valign="top">Description</th>
    <th width="5%" align="left" valign="top">IE</th>
    <th width="4%" align="left" valign="top">F</th>
    <th width="4%" align="left" valign="top">O</th>
  </tr>
  <tr>
    <td valign="top"><a href="met_win_alert.asp">alert()</a></td>
    <td valign="top">Displays an alert box with a message and an OK button</td>
    <td valign="top">4</td>
    <td valign="top">1</td>
    <td valign="top">9</td>
  </tr>
  <tr>
    <td valign="top"><a href="met_win_blur.asp">blur()</a></td>
    <td valign="top">Removes focus from the current window</td>
    <td valign="top">4</td>
    <td valign="top">1</td>
    <td valign="top">9</td>
    </tr>
  <tr>
    <td valign="top"><a href="met_win_clearinterval.asp">clearInterval()</a></td>
    <td valign="top">Cancels a timeout set with setInterval()</td>
    <td valign="top">4</td>
    <td valign="top">1</td>
    <td valign="top">9</td>
    </tr>
  <tr>
    <td valign="top"><a href="met_win_cleartimeout.asp">clearTimeout()</a></td>
    <td valign="top">Cancels a timeout set with setTimeout()</td>
    <td valign="top">4</td>
    <td valign="top">1</td>
    <td valign="top">9</td>
    </tr>
  <tr>
    <td valign="top"><a href="met_win_close.asp">close()</a></td>
    <td valign="top">Closes the current window</td>
    <td valign="top">4</td>
    <td valign="top">1</td>
    <td valign="top">9</td>
    </tr>
  <tr>
    <td valign="top"><a href="met_win_confirm.asp">confirm()</a></td>
    <td valign="top">Displays a dialog box with a message and an OK 
	and a Cancel button</td>
    <td valign="top">4</td>
    <td valign="top">1</td>
    <td valign="top">9</td>
    </tr>
  <tr>
    <td valign="top"><a href="met_win_createpopup.asp">createPopup()</a></td>
    <td valign="top">Creates a pop-up window</td>
    <td valign="top">4</td>
    <td valign="top">No</td>
    <td valign="top">No</td>
    </tr>
  <tr>
    <td valign="top"><a href="met_win_focus.asp">focus()</a></td>
    <td valign="top">Sets focus to the current window</td>
    <td valign="top">4</td>
    <td valign="top">1</td>
    <td valign="top">9</td>
    </tr>
  <tr>
    <td valign="top"><a href="met_win_moveby.asp">moveBy()</a></td>
    <td valign="top">Moves a window relative to its current position</td>
    <td valign="top">4</td>
    <td valign="top">1</td>
    <td valign="top">9</td>
    </tr>
  <tr>
    <td valign="top"><a href="met_win_moveto.asp">moveTo()</a></td>
    <td valign="top">Moves a window to the specified position</td>
    <td valign="top">4</td>
    <td valign="top">1</td>
    <td valign="top">9</td>
    </tr>
  <tr>
    <td valign="top"><a href="met_win_open.asp">open()</a></td>
    <td valign="top">Opens a new browser window</td>
    <td valign="top">4</td>
    <td valign="top">1</td>
    <td valign="top">9</td>
    </tr>
  <tr>
    <td valign="top"><a href="met_win_print.asp">print()</a></td>
    <td valign="top">Prints the contents of the current window</td>
    <td valign="top">5</td>
    <td valign="top">1</td>
    <td valign="top">9</td>
    </tr>
  <tr>
    <td valign="top"><a href="met_win_prompt.asp">prompt()</a></td>
    <td valign="top">Displays a dialog box that prompts the user for input</td>
    <td valign="top">4</td>
    <td valign="top">1</td>
    <td valign="top">9</td>
    </tr>
  <tr>
    <td valign="top"><a href="met_win_resizeby.asp">resizeBy()</a></td>
    <td valign="top">Resizes a window by the specified pixels</td>
    <td valign="top">4</td>
    <td valign="top">1</td>
    <td valign="top">9</td>
    </tr>
  <tr>
    <td valign="top"><a href="met_win_resizeto.asp">resizeTo()</a></td>
    <td valign="top">Resizes a window to the specified width and height</td>
    <td valign="top">4</td>
    <td valign="top">1.5</td>
    <td valign="top">9</td>
    </tr>
  <tr>
    <td valign="top"><a href="met_win_scrollby.asp">scrollBy()</a></td>
    <td valign="top">Scrolls the content by the specified number of pixels</td>
    <td valign="top">4</td>
    <td valign="top">1</td>
    <td valign="top">9</td>
    </tr>
  <tr>
    <td valign="top"><a href="met_win_scrollto.asp">scrollTo()</a></td>
    <td valign="top">Scrolls the content to the specified coordinates</td>
    <td valign="top">4</td>
    <td valign="top">1</td>
    <td valign="top">9</td>
    </tr>
  <tr>
    <td valign="top"><a href="met_win_setinterval.asp">setInterval()</a></td>
    <td valign="top">Evaluates an expression at specified intervals</td>
    <td valign="top">4</td>
    <td valign="top">1</td>
    <td valign="top">9</td>
    </tr>
  <tr>
    <td valign="top"><a href="met_win_settimeout.asp">setTimeout()</a></td>
    <td valign="top">Evaluates an expression after a specified number of milliseconds</td>
    <td valign="top">4</td>
    <td valign="top">1</td>
    <td valign="top">9</td>
    </tr>
  </table>
<br />
<hr />

<p>From <b>http://www.w3schools.com</b> (Copyright Refsnes Data)</p>

</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -