Contents
创建上传按钮。
返回: KUploadButton
示例:
var uploadbutton = K.uploadbutton({
button : K('#ke-upload-button')[0],
fieldName : 'imgFile',
url : '../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();
});