How to Do layout

Source: Internet
Author: User
How does the layout work? I want to do this exercise. there is a navigation bar on the web page. the navigation bar is divided into two parts. click the entries in the navigation bar and I will update the display content on the left, click the entry on the left to update the content on the right. On the left side, I want to use a div. click each entry in the navigation bar and update the corresponding content on the left side. in this way, there are not many divs on the left. how do you do the layout?
I want to do this exercise. there is a navigation bar on the web page. the navigation bar is divided into two parts. click the entries in the navigation bar and I will update the display content on the left, click the entry on the left to update the content on the right.
On the left side, I want to use a div. click each entry in the navigation bar and update the corresponding content on the left side. in this way, there are not many divs on the left. how do you do this?
How can it be better?


------ Solution --------------------
A lot of divs are just a lot of divs. they need to be displayed and hidden.
------ Solution --------------------
1. many DIV
2. Ajax
------ Solution --------------------
For div + ajax
------ Solution --------------------
Ajax is a technology that uses Javascript scripts to implement interaction. For your ideas, refer to the QQ space. The csdn Forum can be implemented using iframe + js, or ajax. Ajax is recommended. The premise is that javascript should be written first, and you will understand it later.
------ Solution --------------------
If you want to display a part of static content, simply use div, you need to call up the data first, and then process the content to be displayed, and control css to hide it. Then, modify css in js to display this part.

If the content needs to be updated in real time, the best way is to handle js classes such as ajax or jquery. get.

Of course, there is also the most stupid way, that is, using dom
------ Solution --------------------
Framework technology
------ Solution --------------------
For better solutions, use iframe: define right as iframe, and each navigation column corresponds to a left page;
If there is not much left content, you can use ajax callback to display it.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.