求助,JS如何动态改变图片的路径
如题,图片是从数据库中动态输出的,已经将图片和图片说明从数据库中提取并以数组形式存入JS中,基本代码如下,不知道如何实现,要的效果如图,
<script language='javascript'>
<%
dim photo,photo_content,i
photo = Split(pic,",",-1)
photo_content = Split(content,",",-1)
for i=0 to ubound(photo)-1
%>
var p_array = new Array( );
var c_array = new Array( );
p_array[<%=i%>] = "<%=photo(i)%>";
c_array[<%=i%>] = "<%=photo_content(i)%>";
<%next%>
</script>