主题: url 回调没成功?求解!
作者: 忽忽, 发布日期: 2013-02-03 13:02:42, 浏览数: 2078
KindEditor.ready(function(K) {
var editor1 = K.create('textarea[name="content1"]', {
cssPath : '../plugins/code/prettify.css',
uploadJson : '../php/upload_json.php',
fileManagerJson : '../php/file_manager_json.php',
allowFileManager : true,
afterCreate : function() {
var self = this;
K.ctrl(document, 13, function() {
self.sync();
K('form[name=example]')[0].submit();
});
K.ctrl(self.edit.doc, 13, function() {
self.sync();
K('form[name=example]')[0].submit();
});


}
});

 
KindEditor.ready(function(K) {
                  K.create('#c2', {
                afterUpload : function(url) {
document.getElementById("attachurl").value=url;  
                        alert(url);
                }
        });
});

prettyPrint();

});




<form name="example" method="post" action="demo.php">
<textarea id="c2" name="content1" style="width:700px;height:200px;visibility:hidden;"><?php echo htmlspecialchars($htmlData); ?></textarea>
<br />
<br />
<input  id="attachurl" name="name" type="text" value="">
<input type="submit" name="button" value="提交内容" /> (提交快捷键: Ctrl + Enter)
</form>


发表新帖 发表回复