主题: 上传按钮API ,用不来,提示 K未定义 |
作者: drivewind, 发布日期: 2012-03-01 14:56:52, 浏览数: 3487 |
我是这么调用的,应该没错啊 <script charset="utf-8" src="/inc/kind/kindeditor.js"></script> <script charset="utf-8" src="/inc/kind/lang/zh_CN.js"></script> <script> var uploadbutton = K.uploadbutton({ button : K('#ke-upload-button')[0], fieldName : 'imgFile', url : '/inc/kind/php/upload_json.php', afterUpload : function(data) { if (data.error === 0) { alert(data.url); } else { alert(data.message); } } }); uploadbutton.fileBox.change(function(e) { uploadbutton.submit(); }); </script> <input id='ke-upload-button' name="" type="button" value="上传" />
|
作者: Roddy, 发布日期: 2012-03-01 16:06:56 |
4.0开始只有一个KindEditor全局变量,K改成KindEditor就可以。或者上面放 window.K = KindEditor;
|
回复 |