网页资讯视频图片知道文库贴吧地图采购
进入贴吧全吧搜索

 
 
 
日一二三四五六
       
       
       
       
       
       

签到排名:今日本吧第个签到,

本吧因你更精彩,明天继续来努力!

本吧签到人数:0

一键签到
成为超级会员,使用一键签到
一键签到
本月漏签0次!
0
成为超级会员,赠送8张补签卡
如何使用?
点击日历上漏签日期,即可进行补签。
连续签到:天  累计签到:天
0
超级会员单次开通12个月以上,赠送连续签到卡3张
使用连续签到卡
09月29日漏签0天
javascript吧 关注:269,217贴子:906,377
  • 看贴

  • 图片

  • 吧主推荐

  • 游戏

  • 2回复贴,共1页
<<返回javascript吧
>0< 加载中...

大神们,求救。javascript对象不支持的属性或方法

  • 只看楼主
  • 收藏

  • 回复
  • livershi
  • var
    1
该楼层疑似违规已被系统折叠 隐藏此楼查看此楼
SCRIPT438: 对象不支持“UpdateInfo”属性或方法
代码如下:
<script>
function StartProgress(progressIdValue) {
new ProggressUpdater().Start(progressIdValue, OnProgerssComplete);
}
function OnProgerssComplete() {
alert("complete");
}
function ProggressUpdater() {
this.progressWaiting = false;
this.timerId = null;
this.isComplete = true;
this.progerssComplete = null;
this.progressId = 0;
this.filePath = "";
this.processValue = 0;
this.errMessage = "";
this.startTime = new Date();
this.outTime = 3;//连接超时时间,单位分钟
this.Start = function (progressIdValue, progerssCompleteFunc) {
window.ProggressUpdaterInstance = this;
this.isComplete = false;
this.timerId = window.setInterval(this.ContinueProgress, 500);
this.progerssComplete = progerssCompleteFunc;
this.progressId = progressIdValue;
this.time = new Date();
};
this.End = function () {
if (this.timerId != null && this.timerId > -1)
window.clearInterval(this.timerId);
progressComplete();
};
this.ContinueProgress = function () {
if (this.progressWaiting) {
return;
}
this.progressWaiting = true;
if (!this.isComplete) {
var info = '{isComplete="1",filePath=[""],processValue="30",err=""}';
alert(info);
this.UpdateInfo(info);
if(this.isCompleted)
{
this.End();
}
}
this.progressWaiting = false;
};
this.UpdateInfo = function (aaa) {
alert(aaa);
var json = eval('(' + aaa + ')');
if(json.isCompleted==1)this.isCompleted =true;
else this.isCompleted =false;
this.filePath = json.filePath;
this.processValue = json.processValue;
this.errMessage = json.err;
};
}
StartProgress(11);
</script>


  • 美滋滋丶
  • Date
    13
该楼层疑似违规已被系统折叠 隐藏此楼查看此楼
function ProggressUpdater() {
这行代码下面 加一句 var this1 = this; // this1 名字随便你起。
然后把 this.UpdateInfo(info);
改成 this1..UpdateInfo(info);
// 你那边用this 是指在 ContinueProgress 这个方法里面的。并不是ProggressUpdater
所以 会出现找不到UpdateInfo


登录百度账号

扫二维码下载贴吧客户端

下载贴吧APP
看高清直播、视频!
  • 贴吧页面意见反馈
  • 违规贴吧举报反馈通道
  • 贴吧违规信息处理公示
  • 2回复贴,共1页
<<返回javascript吧
分享到:
©2026 Baidu贴吧协议|隐私政策|吧主制度|意见反馈|网络谣言警示