html:
<input type="button" id="Bimage" value="批量上传" /><br/>
<input id="BigPic" name="BigPic" value="" style="width:800px;" />
JS:
<script>
KindEditor.ready(function(K) {
var editor = K.editor({
allowFileManager : true,
uploadJson : '../kindeditor/asp/upload_json.asp'
});
K('#Bimage').click(function() {
editor.loadPlugin('multiimage', function() {
editor.plugin.multiImageDialog({
clickFn : function(urlList) {
K.each(urlList, function(i, data) {
//var j=document.getElementById('BigPic').value;
//if(j==""){
//imgurl=data.url;
//}
//else{
//imgurl=j+"|"+data.url;
//}
//$("#BigPic").val(imgurl);
var div = K('#BigPic').val();
if(div==""){
imgurl=data.url;
} else{
imgurl=div+","+data.url;
}
K("#BigPic'").val(imgurl);
});
editor.hideDialog();
}
});
});
});
});
</script>
我只是想批量上传的图片地址输入到"BigPic"标签里
但这货不斥劳苦的把我整个页面的input标签都插入了一遍,整个页面密密麻麻的都是批量上传的图片地址……
这是要闹哪样呀· 求大神帮忙。谢谢了·