日期:2014-05-16  浏览次数:20431 次

new Array(8) 只赋1个值有问题,如何解决?
var   v   =   new   Array(8);
Response.Write( " <p> len: "   +   v.length   +   "   val:   [ "   +   v[0]   + "] ");

结果:
len:   1   val:[]

val[0]   怎么没有数值

------解决方案--------------------
<%@ Language= "JScript "%>
<%
var v = new Array( "8 ");
Response.Write( " <p> len: " + v.length + " val: [ " + v[0] + "] ");
%>