开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜