我有一個功能,其中用戶可以保存應用程序的狀態,應用程序由許多視覺元素爲了這個,我覺得我的存儲工作區的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