1
我有這樣的:Plupload上傳進度速度
var uploader = $('#plupload').pluploadQueue();
uploader.bind('UploadProgress', function(up, file)
{
speedLog(uploader);
});
function speedLog(uploader) {
var speed = uploader.total.bytesPerSec;
console.log(speed);
};
和它的作品,我可以看到在Firebug的輸出,但大規模的,我的意圖是要提交「速度」低谷阿賈克斯。我想每5秒左右調用一次speedLog(),我該如何實現?
感謝SR查詢。 我這樣做:
window.setInterval(
function speedLog(uploader) {
var uploader = $('#plupload').pluploadQueue();
var speed = uploader.total.bytesPerSec;
if(speed > 0)
{
console.log(speed);
} else {
clearInterval(ib);
}
}, 5000);
看起來不錯:http://imageshack.us/photo/my-images/221/speedt.png/
希望能節省您的時間。 – 2012-02-07 05:15:44