我有兩個彈出窗口。如果我點擊創建按鈕,一個彈出窗口將打開。假設彈出窗口中有3個rowse。 a)第1行 - >名字; Row2->姓氏; Row3-> Email按鈕 b)如果我點擊電子郵件按鈕,它會打開一個彈出窗口。在這個彈出我有CkEDITOR。所以,無論在這個ckediotr中輸入即時消息,我將這些值存儲在隱藏在第一個彈出窗口中的輸入中。 c)然後點擊第一個彈出框中的提交按鈕,彈出關閉並重定向到索引頁。值也在數據庫中正確存儲。 問題: 一旦價值再次存儲在數據庫中,即時計劃創建一個新的表單,即時點擊郵件按鈕和ckediotr將打開。但之前的數值仍然存在於CKediotr中。如何從ckeditor中刪除現有的值?值不是從ckeditor清除
<form method="post" id='form'>
<textarea id="editor1" name="editor1"></textarea>
<input type="submit" value="Save"/>
<script> $(document).ready(function(){ var test = localStorage.setValueInCkeditor_create; if(test!='' || test!='undefined') { CKEDITOR.instances.editor1.setData(test); } $('#form').submit(function(){ window.parent.$("#create_ck_editor").val(CKEDITOR.instances.editor1.getData()); localStorage.setItem("setValueInCkeditor_create", CKEDITOR.instances.editor1.getData());
parent.$.colorbox.close(); return false; }); });
</script>
<形式方法= 「POST」 ID = '形式'> – karthik