JavaScript Window Function Guide Name Window and Frame
(Author: hear the wind compiler 2001 at 11:35 on January 19)
When you create a document of a framework structure, the Name property of the tag defines the name of each frame, as follows:
Target Meaning_BLANK is loaded in a new empty window, and the new window is not named. _PARENT is loaded in the direct parent window of the window where the link is located. _Search is loaded on the browser search area, note that this feature is only available in Internet Explorer 5 or later. _Self loads documents in the window where the link is located. _Top loads a document in the top window. Now we understand the frame name, below them work with the window. When defining the Target is "_blank", a new window will pop up. For example, if you want a link to open in a new window, use the following code: a new page New window is not named, in other words, it can't Quoted by the Target property of other elements. But what happens when we use a standard Target name? Please see the definition below: a new tip In this case, we provide a special name for the new window. The name of the new window is "tip", so any link or form is defined as long as Target = "TIP" is defined, the page is loaded in the same window. If there is no frame or window to match the specified target, then click the link to open in a new window. Take a look at the example below: ccidnet Technical heavens and earth to see the result: ccidnet, technology world
Click on the first link to open the document in a new window. Click on the second link and will also generate a new window. If you click on the link again, the new window will still open. If you see, the link will have a new window every time you are clicked. Let's try again below: ccidnet Technical heavens and earth effects are as follows: CCIDNET,
Technical world
Click on the first link to generate a new window. Then click on the second link, the new document will appear in the window just opened. The new window defines a clear name called "main", so any link or form specified Target = "main" will be loaded in that window. The name of the name is by the help of JavaScript, we can discover the name of the window through the window's name attribute (for IE3 , N2 ). Similarly, we can set the name attribute of a frame or window (for IE3 , N3 ). Let's take a look at the HTML document below: