sql查询记录建立ASP数组
展开全部
<script type="text/javascript">
var arr1=new array();
<%
sql = "select answer from question where tixingid = 3"
set rs = server.CreateObject("adodb.recordset")
rs.open sql,connbbs,1,1
Dim a() '定义a数组
Dim l
l = 0
While Not Rs.EOF
%>
arr1 =<%= Rs("answer")%> //保存新数据
<%
Rs.MoveNext
Wend
rs.close
set rs = nothing
%>
</script>
var arr1=new array();
<%
sql = "select answer from question where tixingid = 3"
set rs = server.CreateObject("adodb.recordset")
rs.open sql,connbbs,1,1
Dim a() '定义a数组
Dim l
l = 0
While Not Rs.EOF
%>
arr1 =<%= Rs("answer")%> //保存新数据
<%
Rs.MoveNext
Wend
rs.close
set rs = nothing
%>
</script>
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询