JS数组里的值不能被循环取出
<script type="text/javascript">
var imgUrl=new Array();
var imgtext=new Array();
var imgLink=new Array();
var Num=0;
<%Set Rs=Server.CreateObject("ADODB.RecordSet")
Str_SQL="Select * From Info Where Class_ID=1 Order By id Desc"
RS.Open Str_SQL,Conn,1,1
Conts=Rs.RecordCount
For i = 1 To Rs.RecordCount
%>
imgUrl[<%= i %>]="upload/<%= Rs("Img") %>|";
imgtext[<%= i %>]="<%= Rs("标题") %>|";
imgLink[<%= i %>]=escape("content.asp?id=<%=Rs("id")%>&Class_ID=1")+"|";
<%Rs.Movenext
Next
%>
var focus_width=285
var focus_height=200
var text_height=18
var swf_height = focus_height+text_height
for (i=1;i<<%= Conts %>;i++){
var pics = imgUrl;
pics = pics.substring(0,pics.length-1);
var texts = imgtext[i];
texts = texts.substring(0,texts.length-1);
var links = imgLink[i];
links = links.substring(0,links.length-1);
}
document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+ focus_width +'" height="'+ swf_height +'">');
document.write('<param name="allowScriptAccess" value="sameDomain"><param name="movie" value="images/focus.swf"><param name="quality" value="high"><param name="bgcolor" value="#F0F0F0">');
document.write('<param name="menu" value="false"><param name=wmode value="opaque">');
document.write('<param name="FlashVars" value="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'">');
document.write('<embed src="images/pixviewer.swf" wmode="opaque" FlashVars="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'" menu="false" bgcolor="#F0F0F0" quality="high" width="'+ focus_width +'" height="'+ focus_height +'" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />'); document.write('</object>');
</script>
</span></a><span id=focustext class=f14b> </span>