Solution! There is a big classification under the web page, there are subcategories in the big classification, there is content in the subcategories, how to solve with ajax

Source: Internet
Author: User
Solution! There is a large category on the web page. There are subcategories under a big category and content under a subcategory. how can I solve this problem with ajax? This post was finally edited and solved by redenn from 2012-11-2822: 53: 09! On the webpage, there is a big classification, a big classification has a sub-category, and a sub-category has content. I first got a big classification and used it to request a sub-category from the database through ajax and solve it through documen! There is a large category on the web page. There are subcategories under a big category and content under a subcategory. how can I solve this problem with ajax?
This post was finally edited and solved by redenn at 22:53:09, January 28!
There is a large category on the web page. there is a sub-category under the big category, and there is content under the sub-category. I first got the big classification and used it to request a sub-category from the database through ajax and use the document. getElementById (xx ). innerHTML = "xx" returns the subcategory to the html page, but now I want to click the subcategory to see the content below it, however, I found that there is no html code for the returned subcategory on the webpage (its content is only displayed on the webpage), and thus JavaScript code cannot be used to perform operations on the subcategory. How can we solve this problem?
This is equivalent to: after ajax reads data from the database, how can it be displayed as a cascade menu? If there are sub-targets under the target, there are sub-targets under the sub-target.

We 'd better not use jquery. I just got in touch with js and want to learn about jquery's rules right away. it's time for the monkey to solve this problem.
------ Solution --------------------
Refer to the jquery tree model.

Http://blog.csdn.net/moon66sun/article/details/7946564


------ Solution --------------------
How do you do it now? Paste code.
------ Solution --------------------
There are N ways to do the linkage menu. if the figure is simple, use jquery-ui.
Related Article

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.