the second window is named: " + window2.name + "")
win2.htm, which defines the content for window2, contains the following code:
相关 the example for the frame object.
the window property is a synonym for the current window or frame.
1. window.propertyname 2. window.methodname
propertyname is the defaultstatus, status, length, or name property when the calling window refers to a window object.
propertyname is the length or name property when the calling window refers to a frame object.
methodname is any method associated with the window object.
the window property refers to the current window or frame.
although you can use the window property as a synonym for the current frame, your code is more readable if you use the self property. for example, window.name and self.name both specify the name of the current frame, but self.name is easier to understand.
use the window property to disambiguate a property of the window object from a form or form element of the same name. you can also use the window property to make your code more readable.
the window property is read-only. the value of the window property is
<object nameattribute>where nameattribute is the name attribute if window refers to a frame, or an internal reference if window refers to a window.
in the following example, window.status is used to set the status property of the current window. this usage disambiguates the status property of the current window from a form called "status" within the current window.
writes one or more htm expressions to a document in the specified window.
document.write(expression1 [,expression2], ...[,expressionn])expression1 through expressionn are any javascript expressions or the properties of existing objects.
the write method displays any number of expressions in a document window. you can specify any javascript expression with the write method, including numerics, strings, or logicals.
the write method is the same as the writeln method, except the write m