我使用jQuery的上傳者從here我想知道如何獲得文件的總數已被添加,而不是上傳。獲取上傳文件數
沒有關於新版本的具體文檔,所以任何人都可以說我該怎麼做?
當我需要得到這樣 「uploading 1 of n files
」
在這裏,在documentation說:
$('#fileupload').bind('fileuploadadded', function (e, data) {
//Here I need to get the upload count.
});
,如果我如下圖所示它給了我算作1
var totalfiles = data.files.length;
alert(totalfiles);
@ lgomezma,感謝that.I做同樣的,但我一直在裏面同一迴路所以它有總是拿1。 – coder 2012-04-07 16:30:47
是的,我想象的是:) – lgomezma 2012-04-07 16:48:04
最好的解決方案,upvoted。 – 2017-03-10 23:27:58