路过的javascript朋友请帮我看分析下,值为什么没传过来。
var fileInput;
var submitButton;
var progressBarBoxContent;
var progressBar;
var progressPercent;
function refreshProgress() {
UploadMonitor.getUploadInfo(updateProgress);
}
function updateProgress(uploadInfo) {
if (uploadInfo.inProgress) {
var fileIndex = uploadInfo.fileIndex;
progressPercent = Math.ceil((uploadInfo.bytesRead / uploadInfo.totalSize) * 100);
//progressPercent 在这里有值我想传到下边去。
Ext.onReady(function(){
getEl( 'mb6 ').on( 'click ', function(){
Ext.MessageBox.show({
title: 'Please wait... ',
msg: 'Initializing... ',
width:240,
progress:true,
closable:false,
animEl: 'mb6 '
});
var f = function(v){
return function(){
if(v == 101){
Ext.MessageBox.hide();
}else{
Ext.MessageBox.updateProgress(v/100, 'Loading item ' + v + '% ');
}
};
}
alert(progressPercent);
//为什么这里得不到progressPercent的值,如何才能够得到