1. Reference others' classics (syntax)
Typographical mark
<Frameset> <frame> <Noframes> <IFRAME> |
■ Framework concept: |
The so-called framework is to divide a webpage into several frames and obtain multiple URLs at the same time. You only need to <frameset> <frame>, and all the frame tags should be placed in a total HTML file. This file only records how the framework is divided and does not display any information, therefore, you do not need to add the <body> flag. to browse this framework, you must read this file instead of the files in other frame windows. <Frameset> is used to divide a frame window. Each frame window is marked by a <frame> MARK. <frame> must be used in the <frameset> range. For example: <Frameset Cols = "50%, *">
<Frame name = "hello" src = "up2u.html">
<Frame name = "hi" src = "me2.html">
</Frameset>
In this example, <frameset> splits the image into the left and right sides, displays up2u.html on the left, and displays the me2.html file on the right, <frame> the marked window is always in the order of top, bottom, left to right.
This section is mostly the same as the composer classroom's [Application Framework], but this section adds content and details. As in other chapters, we will not mention the webpage creation tool, if you have learned HTML, I believe you will not use composer or Frontpage tools.
|
|
<Frameset> frame tag, used to declare an HTML file as the frame mode and set how to split the windows. <Frame> only sets the parameter attributes in a window.<Frameset> parameter settings: Example: <frameset rows = "90, *" frameborder = "0" border = 0 framespacing = "2" bordercolor = "#008000">
- Cols = "90 ,*"
Vertical Cut screen (such as divided between the left and right pictures), accept the integer, percentage, * represents the occupied space. The number of values indicates the number of windows to be divided by commas. For example, cols = "30, *, 50%" can be divided into three windows. The first window is the width of 30 pixels, which is an absolute split, the second window is the space left after the first and third windows are allocated, and the third window occupies 50% of the width of the entire screen. You can adjust the number by yourself.
- Rows = "120 ,*"
It is horizontal cutting, which separates up and down the screen. The value is set to the same as above. The Cols parameter and the rows parameter should not be in the same <frameset> flag, because netacape occasionally cannot display this type of frame, so use multiple splits.
- Frameborder = "0"
Set the frame border. The value is only 0 and 1. 0 indicates no border, and 1 indicates that the border is to be displayed. (Avoid using yes or no)
- Border = "0"
Set the Border thickness of the frame, in pixels.
- Bordercolor = "#008000"
Set the border color of the frame.
- Framespacing = "5"
The gap between the framework and the framework.
<Frame> parameter settings: Example: <frame name = "TOP" src = "a.html" marginwidth = "5" marginheight = "5" scrolling = "Auto" frameborder = "0" noresize framespacing = "6" bordercolor = "# 0000ff">
- Src = "a.html"
Set the name of the webpage file to be displayed in this box. Each box must correspond to a webpage file. You can use absolute or relative paths. For more information about the two, see [LINK advanced ].
- Name = "TOP"
Set the name of the window to specify the framework for linking.
- Frameborder = 0
Set the frame border. The value is only 0 and 1. 0 indicates no border, and 1 indicates that the border is to be displayed. (Avoid using yes or no)
- Framespacing = "6"
The gap between the framework and the framework.
- Bordercolor = "#008000"
Set the border color of the frame. For color values, see [HTML Analysis ].
- Scrolling = "Auto"
Set whether to display the scroll. "Yes" indicates that the scroll is to be displayed. "No" indicates that no scroll is displayed in any case. "Auto" indicates that the scroll is displayed based on actual conditions.
- Noresize
This parameter is not set to allow users to change the size of the frame. Users can pull the frame and change its size with ease.
- Marginhight = 5
Space reserved by some edges of the frame height.
- Marginwidth = 5
The space reserved by the edge of the frame width.
The following are examples: (same as the composer classroom's [Application Framework)
Example |
HTML code |
|
<Frameset rows = "80, *">
<Frame name = "TOP" src = "a.html">
<Frame name = "bottom" src = "B .html">
</Frameset>
|
Example |
HTML code |
|
<Frameset rows = "80, *, 80">
<Frame name = "TOP" src = "a.html">
<Frame name = "Middle" src = "B .html">
<Frame name = "bottom" src = "c.html">
</Frameset>
|
Example |
HTML code |
|
<Frameset Cols = "150, *"> <Frameset rows = "80, *">
<Frame name = "upper_left" src = "a.html">
<Frame name = "lower_left" src = "B .html">
</Frameset>
<Frame name = "right" src = "c.html">
</Frameset>
|
Example |
HTML code |
|
<Frameset rows = "80, *">
<Frame name = "TOP" src = "a.html">
<Frameset Cols = "150, *">
<Frame name = "lower_left" src = "B .html">
<Frame name = "lower_right" src = "c.html">
</Frameset>
</Frameset>
|
Example |
HTML code |
|
<Frameset Cols = "150, *">
<Frame name = "Left" src = "a.html">
<Frameset rows = "80, *">
<Frame name = "upper_right" src = "B .html">
<Frame name = "lower_right" src = "c.html">
</Frameset>
</Frameset>
|
|
|
When the browser used by others is too old and does not support the framework function, what he sees will be blank. To avoid this situation, you can use the <noframes> flag. When the user's browser does not see the framework, he will see the content between <noframes> and </noframes>, instead of blank. This content can be used to remind you to switch to a new browser, or even a webpage without a framework or automatically switch to a version without a framework. Application Method: Add the </noframes> tag to the <frameset> tag range. The following is an example:
-
<Frameset rows = "80, *">
-
<Noframes>
<Body>
Sorry, the browser used in feedback does not support the framework function. Please switch to a new browser.
</Body>
</Noframes>
-
<Frame name = "TOP" src = "a.html">
-
<Frame name = "bottom" src = "B .html">
-
</Frameset>
If the browser supports the framework, it will not care about the content in <noframes>. However, if the browser does not support the framework, it will skip because it does not know all the framework tags, the enclosed items are interpreted, so the text in the <noframes> range is displayed. |
|
This label applies only to IE. It is used to insert a window in the middle of a page to display another file. It is a blocking mark, but the surrounding words are displayed only when the browser does not support IFRAME marking, such as <noframes>. IFRAME usually works well with a Java Script that identifies the browser. If JavaScript recognizes that the browser is not Internet Explorer, it switches to another version. <IFRAME> parameters are set as follows: Example: <IFRAME src = "iframe.html" name = "test" align = "Middle" width = "300" Height = "100" marginwidth = "1" marginheight = "1" frameborder =" 1 "scrolling =" yes ">
- Src = "iframe.html"
To display the file source name in this box, you must add a relative or absolute path.
- Name = "test"
The box name, which is required by the target parameter of the link tag,
- Align = "Middle"
Optional values: Left, right, top, middle, and bottom.
- Width = "300" Height = "100"
The width and length of the frame window, in pixels.
- Marginwidth = "1" marginheight = "1"
The space reserved by the inserted file and the border.
- Frameborder = "1"
1 indicates the display border, and 0 indicates the display. (Yes or no)
- Scrolling = "yes"
If yes is used, the volume is allowed (inner). If no is used, the volume is not allowed.
|
2. Summary of your specific use (navigation)
The usage in the frame is as follows. If you want to click a control on the interface to jump to another page,
To maintain the navigation function of another page.
The Code is as follows:
<Head id = "head1" runat = "server">
<Title> soff </title>
</Head>
<Frameset rows = "23%, *" frameborder = "0" border = "-1" framespacing = "0" bordercolor = "#008000">
<Frame name = "Index" noresize src = "index. aspx">
<Frame name = "Main" noresize id = Main src = "sendinformsendinformhome. aspx">
</Frameset>
</Html>
This is used in index. aspx.
<Form ID = "form1" runat = "server" target = Main>
3. Exit the entire frameset framework as follows: (logout)
Protected void button3_click (Object sender, eventargs E)
...{
// Session. Clear ();
Response. Write ("<script language = JavaScript>; parent. Location. href = 'index. aspx '; </SCRIPT> ");
Response. End ();
}