联通笔试:asp怎么实现图片动态显示?

来源:百度文库 编辑:查人人中国名人网 时间:2024/05/06 05:33:09
asp后台上传图片后,在数据库保存图片路径~
然后在前台调用图片,怎么实现横向调用多个小图片(有点类似重复),并且点击图片就会指到该图片的详细页(包含:该图片的大图,及文字介绍)

参见 http://www.xuanse.net/zuopin.asp

就像上面网站这样,请高手解答,详细点,我比较菜

高分奉上~
我不明白那一句是让表格横向重复,一般图片都放表格里.布局用

排列图片的代码(比如让一行动态显示3个小图<ID倒叙>,超过3个

就换行)

链接数据库。。。
Set rs = server.createobject("adodb.Recordset")
sql="select * from [表名]"
rs.open sql,conn,1,1
if not rs.eof then
Response.write "<table>"
Response.write "<tr>"
for i = 1 to Rs.reocrdcount
pic=Rs("pic")'
content=Rs("content")
Response.write "<td><a href="show.asp?id="&rs("id")&"&content="&content&""><img src="&pic&" border=0></a>"
Response.write "</td>"
rs.movenext
next
Response.write "</tr>"
Response.write "</table>"
------------------------------------
show.asp
链接数据库
<table>
<tr>
<td><img src="&pic&" border=0></td>
<td>
<%=Request("content")%>
</td>

</tr>
</table>