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 use the document. getElementById (xx! 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 last edited by redenn at 22:53:09, January 28 ,.
Solution!
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.