日期:2014-05-16 浏览次数:20594 次
function ObjArray()
{
this.Count=0;
}
ObjArray.prototype.Add=function(text)
{
this[this.Count++]=text;
}
var objA=new ObjArray();
objA.Add("a");
objA.Add("b");
objA.Add("c");
var x=objA[1];//此时用objA[1]访问能得到字符'b'
//RemoveAt(1);
//x=objA[1];//希望x的值是'c'