开发者

this code works properly in internet explorer but not in mozilla firefox. can someone help

开发者 https://www.devze.com 2023-03-17 19:43 出处:网络
can some one help me with this.... this code works properly in internet explorer but not 开发者_如何学编程in mozilla firefox.

can some one help me with this.... this code works properly in internet explorer but not 开发者_如何学编程in mozilla firefox.

function initGantt() 
{
    var Gantt=null;     
        Gantt = new cTimeLine();
}

function cTimeLine()
{
    this.Units = "weeks";     //not considered as a function in mozilla firefox

}

function cTimeLine.prototype.initUnits(units)
{   
    this.Units = units;
        alert(this.Units);
}


The syntax for creating a new function attached to the cTimeLime.prototype is like this:

cTimeLine.prototype.initUnits = function(units)
{   
    this.Units = units;
    alert(this.Units);
}
0

精彩评论

暂无评论...
验证码 换一张
取 消