主题: kindeditor 2.5.4 文本清空
作者: 兜兜, 发布日期: 2011-05-10 16:46:09, 浏览数: 5114

html:代码

<input type="hidden" name="content" id="content" runat="server" />

<script type="text/javascript" src="./editor2/KindEditor.js"></script>
<script type="text/javascript">
    var editor = new KindEditor("editor");
    editor.hiddenName = "content";
    editor.skinPath = "./editor2/skins/default/";
    editor.iconPath = "./editor2/icons/";
    editor.imageAttachPath = "./editor2/attached/";
    editor.imageUploadCgi = "./editor2/upload_cgi/upload.asp";
    editor.cssPath = "./editor2/common.css";
    editor.editorType = "simple";
    editor.editorWidth = "700px";
    editor.editorHeight = "400px";
    editor.show();
</script>

 

js代码:

//点击发送时插入聊天信息
function chatSend() {
    var num = Math.random();
    editor.data();
    var myckeditor = document.getElementById("content").value;
    $.ajax({ url: "../../Ashx/LoadChat3.ashx?r=" + num + "&months=insert&chatCent=" + encodeURIComponent(myckeditor) + "&userName=" + encodeURIComponent($("#userName").text()) + "&userId=" + $("#userID").text(),
        success: function (data) {
       //在这里清空KindEditor里的内空  怎么清空??
        }

    });
}

请高手指点一

作者: Roddy, 发布日期: 2011-05-10 18:16:38
2.x系列我都忘记接口了,改用最新版本吧
回复
发表新帖 发表回复