<!DOCTYPE html> <html> <head> <title>we234234</title> <script src="ueditor.config.js"></script> <script src="ueditor.all.js"></script> <script src="lang/zh-cn/zh-cn.js"></script> </head> <body> <div id="editor" style="display: none;"></div> <button type="button" onClick="upImage()">上传</button> </body> <script> /*kindeditor 编辑器*/ var ue = UE.getEditor('editor'); //监听图片上传 ue.addListener('beforeInsertImage', function (t,arg) { alert('这是图片地址:'+arg[0].src); }); //弹出图片上传的对话框 function upImage() { var myImage = ue.getDialog("insertimage"); myImage.open(); } </script> </html>