我有一个功能,其中用户可以保存应用程序的状态,应用程序由许多视觉元素为了这个,我觉得我的存储工作区的div的整个HTML串的得到DIV的HTML内容是动态更新自身
<div id = "workspace">
<div id = "playground">
here is my all div where user drag n drop the component from left hand side
</div></div>
我现在做
var x = $("#playground").html() // to get all html content inside the playground div
alert(x)
现在X是给我只能说我已经写在HTML文档不是其他分区,这是追加当用户拖动ñ下降到操场上的html代码
任何机构是否自动保存任何更好的解决方案,并恢复到原来的状态,请让我知道
here is the link to the application
谢谢
尝试使用.text代替.html!也许这会起作用。 – viper 2012-01-10 15:52:56