var jsarray = new Array();
jsarry=recordset.GetRows(Rows,Start,Fields);

解决方案 »

  1.   

    是赋给客户端还是服务器端的javascript数组?
      

  2.   

    是赋予客户端的javascript 数组
      

  3.   

    <script language = "JavaScript">
    var onecount;
    onecount=0;
    array1 = new Array();  
    <%for i=0 to rscount1-1 %>
     array1[<%=i%>]= array[<%=i%>] 
    </script>
      

  4.   

    非常感谢大家,我现在把代码贴出来:
    <%
    set conn = Server.CreateObject("ADODB.connection") 
    conn.open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=e:\局浏览系统\500\规划定点\db1.mdb;" 
    set RsTmp = Server.CreateObject("ADODB.Recordset") 
    RsTmp.Source ="SELECT 工程编号,工程名称,建设单位名称 FROM 规划定点 ORDER BY 工程名称"
    RsTmp.activeconnection=conn
    RsTmp.CursorType = 0
    RsTmp.CursorLocation = 2
    RsTmp.LockType = 3
    RsTmp.Open() 
    arrTmp1=RsTmp.GetRows()
    RsTmp.Close()
    conn.close() 
    set RsTmp=nothing
    %><script language=javascript>
    var resultarray = new array()
    </script>因为arrTmp1是一个多维数组,我现在想把它赋给数组 resultarray,这样的代码究竟该怎样写,我刚刚学编程,还没经验,麻烦大家了
      

  5.   

    <script language=javascript>
    var resultarray = new Array(3) //字段数
    for(var i=0;i<3;i++)
        resultarray[i]=new Array()
    <%
    dim intCount
    for intCount to ubound(arrTmp1,2)
    %>
        resultarray[0][<%=intCount%>]=<%=arrTmp1(0,intCount)%>;
        resultarray[1][<%=intCount%>]=<%=arrTmp1(0,intCount)%>;
        resultarray[2][<%=intCount%>]=<%=arrTmp1(0,intCount)%>;
    <% next %>
    </script>
      

  6.   

    一时疏忽,应该为
        resultarray[0][<%=intCount%>]=<%=arrTmp1(0,intCount)%>;
        resultarray[1][<%=intCount%>]=<%=arrTmp1(1,intCount)%>;
        resultarray[2][<%=intCount%>]=<%=arrTmp1(2,intCount)%>;