In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >
Share
Shulou(Shulou.com)06/01 Report--
Important: do not put the label in the label. And HTML5 no longer supports the use of frameset tags!
1. The frameset element defines a frameset, which is used to organize multiple windows (frames). Each frame has a separate document. With the use of the framework, we can split the page and refresh it partially. Reasonable use will bring very good experience effect to users.
2. Several attributes of frameset:
①, cols: define the number and size of columns in the frameset. Vertical cut screen (such as left and right two pictures), accept integer values, percentages, * means to occupy the remaining space. The number of values represents the number of windows divided and separated by commas. For example, COLS= can be cut into three windows, the first window is 30 pixels wide, which is an absolute division, the second window is the space left after the first and third windows are allocated, and the third window accounts for 50% of the width of the whole window is a relative partition. You can adjust the numbers yourself.
②, rows: defines the number and size of rows in the frameset. This is a horizontal cut, the picture is separated from the top and bottom, and the value setting is the same as above. COLS and ROWS parameters should not be put in the same tag as far as possible, because Netacape occasionally can not display this type of frame, try to use multi-segmentation.
③, frameborder: sets the border of the frame. The values are only 0 and 1. 0 means no border, 1 indicates that the border is to be displayed.
④, border: sets the frame thickness of the frame.
⑤, bordercolor: sets the border color of the frame.
⑥, framespacing: represents the distance between the frame and the white space left between the frame.
3. Attributes of the frame tag:
①, name: set the frame name. This property must be set.
②, src: sets the name or path of the web page to be displayed by this frame. This property must be set.
③, scrolling: sets whether to display scroll bars. Set the values to auto, yes, no.
④, bordercolor: sets the border color of the frame.
⑤, frameborder: sets whether the frame frame is displayed. The set values of 0 and 1 are 0 and 1, respectively, indicating that the border is not wanted and 1 means that the border is to be displayed.
⑥, noresize: set whether the frame size can be adjusted manually.
⑦, marginwidth: sets the width between the frame boundary and its contents.
⑧, marginhight: sets the height between the frame boundary and its contents.
⑨, width: sets the frame width.
⑩, height: set the frame height.
4. Examples of frameset usage:
If you want to achieve the following effect
The page is divided into three parts, top, left and right. Click the hyperlink on the left and the frame page on the right will change accordingly.
Overall page: main.html
1 2 3 4 5 6 7
Top.html,right.html is an empty page. The left.html is as follows:
1 2 3 4 task creation 5 task management 6 dataset management 7 model management 8 9
The hierarchical display of the page is mainly the use of cols and rows in frameset tags, in conjunction with the nesting of frame tags. If you want to click on the menu bar on the left and the frame on the right changes accordingly, you must recognize the properties.
Target: specifies where to open the linked document. The browser will load and display the document in the frame or window named with the href attribute of the tag and whose name matches the target. That is, in main.html, what is the value of the name attribute here, then in left.html, it has to be equal here.
5. How do I get the elements in the other frame in the frameset where the parent page is located in the child page?
That is, how to get the attribute value of the tag in left.html in right.html and so on.
$(parent.parent.mainFrame.document) .contents () .find ("body") .html (); / / manFrame refers to the id of the frame you want to view
For example, in the left.html page above, the ID created by the task is taskCreat, so we can get it like this: and change its class property.
$(parent.parent.left.document) .contents () .find ("# taskCreat") .attr ("class", "list-group-item")
6. Advantages and disadvantages of frameset.
We know that the current HTML5 standard no longer supports frameset, although when using it to reload a page, you don't need to reload the entire page, you only need to reload a frame page in the page (reducing data transfer and speeding up the download speed of the page). But it also has many disadvantages, such as the browser's back button is useless; will generate a lot of pages, not easy to manage; complex code, not easy to be searched by search engines; small mobile devices display is not complete; multi-frame pages will increase server http requests, and so on. Therefore, we need to be careful about the use of frameset, and it is possible for DIV+CSS to implement this function at this stage.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.