javaScript 数组

<>function StorePage(){d=document;t=d.selection?(d.selection.type!='None'?d.selection.createRange().text:''):(d.getSelection?d.getSelection():'');void(keyit=window.open('http://www.365key.com/storeit.aspx?t='+escape(d.title)+'&u='+escape(d.location.href)+'&c='+escape(t),'keyit','scrollbars=no,width=475,height=575,left=75,top=20,status=no,resizable=yes'));keyit.focus();} 数组有四种定义的方式 使用构造函数: var a = new Array(); var b = new Array(8); var c = new Array("first", "second", "third"); 或者数组直接量: var d = ["first", "second", "third"]; 属性 Array只有一个属性,就是length,length表示的是数组所占内存空间的数目,而不仅仅是数组中元素的个数,在刚才定义的数组中,b.length的值为8

你可能感兴趣的:(javaScript 数组)