简体   繁体   中英

Dynamic tree structure in JavaScript

For my application i need to create one tree structure which consist of nested folder which will grow depends open server reponse. just like an email has tree structure-

inbox or sent or draft or outbox(f)/a(f)/some content 
inbox or sent or draft or outbox(f)/a(f)/b(f)/email  content
inbox or sent or draft or outbox(f)/email  content

and other possible combination. since i will get this path from the server so i have to loop it and create appropriate structure..can you guys please help me in it.. thanks in advance.

This is going to be considerably easier to do cross browser using a JavaScript framework (I know this appears to be a standard answer at the moment, but it is a good answer in this case)... use jQuery!

There is a treeview plugin that does exactly what you need, with lots of options too.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM