我正在使用 Valums 文件上传插件,并且在使用 onComplete 方法/触发器/事件时遇到问题,无论它叫什么......它永远不会触发。在那里设置断点,从未发生过。这是我的代码:
jQuery('.btnUploader').each(function (index) {
var uploader1 = new qq.FileUploader({
element: jQuery('.btnUploader')[index], // The HTML element to turn into the uploader
onSubmit: function () {
var componentId = $(this).attr('element').id;
var teamId = clbTeams.GetValue();
uploader1.setParams({
componentId: componentId,
teamId: teamId
});
},
onComplete: function (id, filename, responseJSON) {
alert('test');
},
action: getUrl('ControllerUploadHandler', 'TeamStatusSubmit'), // Action method that will handle the upload
multiple: false, // Single or Mutliple file selection
allowedExtensions: ['docx', 'jpeg', 'jpg', 'png', 'zip', 'ppt'] // File Type restrictions
});
});
我相信,那里的函数及其参数有问题。有人有解决方案吗?