将动态 Javascript 树结构加载到 JSP 中
所以我想读取一个数据库,然后形成一个树结构并将其放入我的网页中。我目前正在使用 destroydrop 树,我可以让它自行工作,但是如果我想构建树然后将其放入我的网页中,那么我的页面会被覆盖,因为它使用 document.write(tree )来创建树。我也尝试过其他一些树,它们都有同样的问题。有人知道我可以动态添加到我的页面而不覆盖那里的内容的树结构吗?谢谢!
So I am wanting to read a database, and then form a tree structure and put it in my webpage. I am using the destroydrop tree at the moment, and I can get it to work on its own, but if I want to build the tree and then put it in my webpage, then my page gets overwritten because it uses document.write(tree) to create the tree. I've also tried some other trees which all have the same issue. Anyone know of a tree structure that I can dynamically add to my page without overwriting what is on there? Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以尝试 nitobi 树。 Nitobi Completeui 框架有客户端和服务器端。
您可以在代码存储库中找到示例。
You can try nitobi tree. Nitobi Completeui framework has both client and server sides.
You can find samples in code repository.
非常感谢您的帮助。我最终只是覆盖了 document.write ,因此
我没有包含树的代码,但可以在 here 找到它。只是想我会把它放在这里以防其他人遇到此类问题。再次感谢您的所有帮助!
Thanks much for the help. I ended up just overriding document.write as such
I did not include the code for the tree, but it can be found here. Just thought I would put this on here in case anyone else has this type of issue. Thanks again for all your help!