基于FCKeditor扩展‘自动保存草稿’功能
作者:xiayuesong 日期:2008-07-19
<script>
/* 每隔30秒将文章保存草稿 */
function copyContentPer(i) {
try {
if (i>0) {
//将FCK内容更新到输入框 (A1)
var oEditor = FCKeditorAPI.GetInstance('BlogContent');
oEditor.UpdateLinkedField();
//关于AJAX部分的解决可参考: (A2)(不关心则略过)
new Ajax.Updater('reBlogId','/AJAX_PostBlog.php?BlogId='+$('reBlogId').innerHTML , { method: 'post',parameters: $('CreateBlog').serialize(true)});
}
//启用定时器 (30秒)
funcTimer("copyContentPer(1)",30000);
} catch(e) {}
}







