//字符串数组
var array1=["1","2","3"]; alert(array1[0]+"|"+array1.length); //对象数组 var array2=[{id:"11",name:"fzg11"},{id:"22",name:"fzg22"}]; alert(array2[0].id+"|"+array1.length); //定义对象方式一 var object1={id:"33",name:"fzg33"}; alert(object1.name); //定义对象方式二 var object2=new function() { this.id="44"; this.name="fzg44"; } alert(object2.name); |