在HTML中保存节点的树结构? [英] Save the tree structure of nodes in HTML??

查看:203
本文介绍了在HTML中保存节点的树结构?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在html页面中显示节点树。并使用javascript使页面用户能够移动节点。但我不知道如何保存树形结构的变化?是否有可能从javascript获取节点的位置?

解决方案

嗨...


:)。 ..棘手的问题...你应该找到该结构的数据库表示,你必须为特定用户保存...它就像用户特定的page-config ...可能你可以保存当前的innerHTML当用户回来时,将文件放回去?


亲切的问候


合并的帖子...请不要双发帖你的问题...


亲切的问候


ps:你甚至不需要三重或多重问题,我''删除了关于这个问题的第三个!


非常感谢你的回复!


实际上这个html节点的信息被读取了来自Matlab数据源。我从Matlab读取它们并使用由Matlab驱动的浏览器显示它们 - 我需要在这个浏览器中运行Matlab命令,这些命令在其他浏览器中不起作用。我想改变节点的位置并将结构保存回Matlab数据源。


但是我检查了所有可用于html和javascript的命令,看来它们可以只能从html的固定源代码中获取信息,除非使用PHP - 这对于这个Matlab浏览器来说有点太过分了。


干杯,

JoJo


hi ...


:) ...棘手的问题...你应该找到该结构的数据库表示,你必须为特定用户保存...它就像用户特定的页面 - config ...可能你可以保存文件的当前innerHTML并在用户回来后将其设置回来吗?


亲切的问候


I display a tree of nodes in a page of html. and use javascript to enable the page users to move nodes around. But I dont know how I can save the change of the tree structure? Is it possible at all to get the position of nodes from javascript?

解决方案

hi ...

:) ... tricky problem ... you should find a database-representation for that structure and you have to save that for the specific user ... its like a user-specific page-config ... may be you could save the current innerHTML of the document and set it back later on when the user comes back?

kind regards


merged threads ... please don''t double post your questions ...

kind regards

ps: don''t even triple- or multipost your questions, i''ve deleted your third one regarding this problem!


Thanks a lot for the reply!

Actually the information of the nodes in this html is read from a Matlab data source. I read them from Matlab and display them using a browser driven by Matlab - I will need to run Matlab commands in this brower, the commands dont work in other browser. I''d like to change the positions of the nodes and save the structure back to the Matlab data source.

But I checked all the commands available for html and javascript, seems them can only get information from fixed source code of html, unless using PHP - which is a little bit too far for this Matlab browser.

Cheers,
JoJo

hi ...

:) ... tricky problem ... you should find a database-representation for that structure and you have to save that for the specific user ... its like a user-specific page-config ... may be you could save the current innerHTML of the document and set it back later on when the user comes back?

kind regards


这篇关于在HTML中保存节点的树结构?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆