window--------------------------------------------------------------------------------DescriptionRepresents an open window in the browser. ResYou use the window object to retrieve information about the state of the window and to gain access to the document in the window, to the events that occur in the window, and to features of the browser that affect the window. Typically, the browser creates one window object when it opens an HTML document. However, if a document defines one or more frames (that is, contains one or more FRAME or IFRAME tags), the browser creates one window object for the original document and one additional window object for each frame. These additional objects are child windows of the original window and can be affected by actions that occur in the original. For example, closing the original window causes all child windows to close. You can also create new windows (and corresponding window objects) by using methods such as open and showModalDialog. You can apply any window property, method, or collection to any variable or expression that evaluates to a window object, regardless of how that window was created. Additionally, you can access all window properties, methods, and collections in the current window by using the property, method, or collection name directly—that is, without prefixing it with an expression that evaluates to the current window object. However, to help make more readable code and to avoid potential ambiguities, many developers use the window keyword when accessing window properties, methods, and collections for the current window. This keyword always refers to the current window. Note Window property, method, and collection names are reserved keywords and cannot be used as the names of variables and routines. The dialogArguments, dialogHeight, dialogLeft, dialogTop, dialogWidth, and returnValue properties are available only for windows created using the showModalDialog method. ExamplesThe following example displays an alert (message) box for the current window. alert("A simple message.")The following example checks whether the current window contains child windows and, if it does, displays the names of those child windows. if (window.frames!=null) {
    for (i=0; i<window.frames.length; i++)
        window.alert("Child window "+i+" is named "+window.frames(i).name);
}The following example shows a simple event handler function for the window's onload event. Note that in the absence of a "window" element, the BODY element hosts the following window object events: onblur, onfocus, onload, and onunload. <BODY onload="window.status='Page is loaded!'">PropertiesclientInformation, closed, defaultStatus, dialogArguments, dialogHeight, dialogLeft, dialogTop, dialogWidth, document, event, history, length*, location, name, navigator, offscreenBuffering, opener, parent*, returnValue, screen, self, status, top* *An asterisk indicates properties not applicable to modal dialogs. Collectionsframes* Methodsalert, blur, clearInterval, clearTimeout, close, confirm, execScript, focus, moveBy, moveTo, navigate, open*, prompt, resizeBy, resizeTo, scroll, scrollBy, scrollTo, setInterval, setTimeout, showHelp, showModalDialog* *An asterisk indicates properties not applicable to modal dialogs. Eventsonbeforeunload, onblur, onerror, onfocus, onhelp, onload, onresize, onscroll, onunload 

解决方案 »

  1.   

    open--------------------------------------------------------------------------------DescriptionOpens a new window and loads the document given by URL, or a blank document if a URL is not provided. Syntax
    window = object.open([URL [, name [, features [, replace]]]])Parameter Description 
    URL  String specifying the URL of the document to display. If no URL is specified, a new window with about:blank will be displayed.  
    name  Optional. String specifying the name of the window. This name is used for TARGET on a FORM or an A.  
    features  Optional. String specifying the window ornaments to display. The following table lists the supported features. Syntax  Description 
    fullscreen={ yes | no | 1 | 0 }  Specifies whether to display the browser in a full-screen or normal window. Default is no. 
    Use full-screen mode carefully. Because this mode hides the browser's title bar and menus, you should always provide a button or other visual clue to help the user close the window. ALT+F4 will also close the new window.
     
    channelmode={ yes | no | 1 | 0 }  Specifies whether to display the window in theater mode and show the channel band.  
    toolbar={ yes | no | 1 | 0 }  Specifies whether to display the browser toolbar, making buttons such as Back, Forward, and Stop available.  
    location= { yes | no | 1 | 0 }  Specifies whether to display the input field for entering URLs directly into the browser.  
    directories = { yes | no | 1 | 0 }  Specifies whether to add directory buttons. Default is no. 
    status={ yes | no | 1 | 0 }  Specifies whether to add a status bar at the bottom of the window. Default is yes. 
    menubar={ yes | no | 1 | 0}  Specifies whether to display the menu bar. Default is yes. 
    scrollbars={ yes | no | 1 | 0}  Specifies whether to display horizontal and vertical scroll bars. Default is yes. 
    resizable={ yes | no | 1 | 0}  Specifies whether to display resize handles at the corners of the window.  
    width=number  Sets the width of the window, in pixels. Minimum value should be 100. 
    height=number  Specifies the height of the window, in pixels. Minimum value should be 100. 
    top=number  Specifies the top position, in pixels. This value is relative to the upper-left corner of the screen. 
    left=number  Specifies the left position, in pixels. This value is relative to the upper-left corner of the screen. 
     
    replace  Optional. A boolean value specifying whether the URL that is loaded into the new page should create a new entry in the window's browsing history or replace the current entry in the browsing history. If true, no new history entry is created.  Return ValueReturns a reference to the new window. Use this reference to script properties and methods on the new window. ResA name for the new window can be used as a target for a form or an A element. By default, the open() method creates a window that has a default width and height and the standard menu, toolbar, and other features of Internet Explorer. You can alter this set of features by using the features parameter. This parameter is a string consisting of one or more feature settings. The replace parameter controls whether the new window is put into the browser history list. For example, the following creates a new window that contains Sample.htm. The new window is 200 by 400 pixels, has a status bar, but does not have a toolbar, menu bar, or address field. window.open("sample.htm",null,
        "height=200,width=400,status=yes,toolbar=no,menubar=no,location=no");Applies Towindow 
      

  2.   

    下载手册
    http://www.programfan.com/club/showbbs.asp?id=2087
    http://www.programfan.net/teach/jscript5.chm
      

  3.   

    MSDNHTML
    http://vip.5d.cn/friday/upload/dhtml html&css.chm