是否可以在回调方法中使用 reset() API 方法?
Is it possible to use the reset() API method within the callback methods?
使用jquery.filer插件时,是否可以在AJAX回调方法中使用reset() API方法?
例如:
var fileUpload = $('#file-upload-input').filer({
uploadFile: {
url: 'note-media-upload',
type: 'POST',
enctype: 'multipart/form-data',
onComplete: function(l, p, o, s, jqXHR, textStatus) {
console.log('onComplete');
fileUpload.reset();
}
}
});
我得到一个错误:Uncaught TypeError: fileUpload.reset is not a function
尝试使用 -
$('#file-upload-input').prop('jFiler').reset();
使用jquery.filer插件时,是否可以在AJAX回调方法中使用reset() API方法?
例如:
var fileUpload = $('#file-upload-input').filer({
uploadFile: {
url: 'note-media-upload',
type: 'POST',
enctype: 'multipart/form-data',
onComplete: function(l, p, o, s, jqXHR, textStatus) {
console.log('onComplete');
fileUpload.reset();
}
}
});
我得到一个错误:Uncaught TypeError: fileUpload.reset is not a function
尝试使用 -
$('#file-upload-input').prop('jFiler').reset();