chrome下可以,但是火狐和360下不行,我的情况与百度上面其他的还不一样,是执行jquery.uploadify-3.1.js 这个文件下的
upload : function() {
var args = arguments;
alert(JSON.stringify(arguments));
alert(JSON.stringify(this));
alert(JSON.stringify($(this)));
this.each(function() {
// Create a reference to the jQuery DOM object
var $this = $(this),
swfuploadify = $this.data('uploadify');
alert("1111");
// Reset the queue information
swfuploadify.queueData.averageSpeed = 0;
swfuploadify.queueData.uploadSize = 0;
swfuploadify.queueData.bytesUploaded = 0;
swfuploadify.queueData.uploadQueue = [];
// Upload the files
if (args[0]) {
if (args[0] == '*') {
swfuploadify.queueData.uploadSize = swfuploadify.queueData.queueSize;
swfuploadify.queueData.uploadQueue.push('*');
swfuploadify.startUpload();
} else {
for (var n = 0; n < args.length; n++) {
swfuploadify.queueData.uploadSize += swfuploadify.queueData.files[args[n]].size;
swfuploadify.queueData.uploadQueue.push(args[n]);
}
swfuploadify.startUpload(swfuploadify.queueData.uploadQueue.shift());
}
} else {
swfuploadify.startUpload();
}
alert("22222");
});
alert("333333");
}
这一段代码异常,chrome下所有的alert正常弹出,而火狐下 alert(JSON.stringify($(this)));执行后就没有消息了,因为alert("333333"); 这个消息都没弹出,判断是在this.each(function() {这里执行就出错了,但是不知道原因,求大神解答