<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>
<% dim s,t,i s="peng" redim t(len(s)-1) for i=1 to len(s) t(i-1)=mid(s,i,1) next '测试结果 for i=0 to ubound(t) response.write t(i) & "<br>" next %>
concat()连接两个或更多的数组,并返回结果。
join()把数组的所有元素放入一个字符串。元素通过指定的分隔符进行分隔。
pop()删除并返回数组的最后一个元素
push()向数组的末尾添加一个或更多元素,并返回新的长度。
reverse()颠倒数组中元素的顺序。
shift()删除并返回数组的第一个元素。
slice()从某个已有的数组返回选定的元素等等。
select 字段,(case bh when 'bh001' then ys+1when 'bh002' then ys+3when 'bh003' then ys+5 else '' end)newcol from 表