类似的图片预览功能,asp代码应该如何写,能给出一个大概的代码吗?(及时结贴)
http://mir3.17173.com/picsent/
如上面网页的那种效果,四行三列的显示固定尺寸的小图,点击小图后显示大图片,这样的效果用asp如何实现?在线等,及时结贴给分。
问题点数:100、回复次数:6Top
1 楼mjpclab(有只大猫猫 mjpclab.net)回复于 2004-08-03 15:10:38 得分 10
他不过是用html实现的Top
2 楼lebo()回复于 2004-08-03 15:14:27 得分 10
www.lebo.cnTop
3 楼chzxq(毛毛鼠)回复于 2004-08-03 15:14:29 得分 80
<!--#include file=../inc/conn.asp-->
<%
Set RstPrj=Server.CreateObject("Adodb.Recordset")
'***************查询*******************'
function iif(a,b,c)
if a then iif = b else iif = c
end function
strSql="select * from 表 order by ID asc"
'Response.Write(strSql):Response.End()
RstPrj.Open strSQL,Conn,1,3
RstPrj.PageSize=12
lngPage=Request("Page")
if lngPage="" Or Not IsNumeric(lngPage) Then
lngPage=1
end if
lngPage=Clng(lngPage)
if lngPage>RstPrj.PageCount Then
lngPage=RstPrj.PageCount
elseif lngPage<=0 then
lngPage=1
end if
if RstPrj.PageCount<> 0 then
RstPrj.AbsolutePage=lngPage
end if
dim CurrentPage
CurrentPage=lngPage
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title></title>
</head>
<body leftmargin="0" topmargin="0">
<div align="center">
<table width="778" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="557" align="center" valign="top">
<table width="529" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="555" height="63" align="center" valign="middle" >
</td>
</tr>
</table>
<table border="0" cellspacing="0" cellpadding="0">
<%
if not RstPrj.EOF then
%>
<tr>
<%
dim i
i=0
while not RstPrj.EOF and i<RstPrj.PageSize
%>
<td height="165" align="center" valign="middle" background="../image/ny_pro_bg.jpg" style="width:170px;height:165">
<table width="150" height="157" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="132" align="center" valign="bottom"><a href="大图的地址"><img src="../manage/<%=RstPrj("UploadFiles")%>" width="140" height="115" alt="图片"></a></td>
</tr>
<tr>
<td align="center"><a href="item.asp?ArticleID=<%=RstPrj("ArticleID")%>" target="_blank"><%=RstPrj("title")%></a></td>
</tr>
</table></td><%
i=i+1
RstPrj.MoveNext
if i mod 4 =0 then
Response.Write "</tr>"
end if
wend
else
%>
<td align="left" height=120 style="width:170px;height:165">没有产品信息</td>
<%
end if
%>
</tr>
</table>
</td>
</tr>
</table>
</div>
</body>
</html>
<%
RstPrj.Close()
set RstPrj=Nothing
Call CloseConn()
%>Top
4 楼zftnt(学习中的菜鸟)回复于 2004-08-03 15:39:58 得分 0
我先试试上面的朋友给的程序,感谢啊Top
5 楼zftnt(学习中的菜鸟)回复于 2004-08-03 15:46:05 得分 0
楼上的给出的代码不行啊,我要的是四行三列的效果,这个表格里面每个表格一个图片如何实现呢?我用的Access数据库,图片路径已经上传到数据库了,关键是如何显示预览图小图的功能,再次请教。Top
6 楼zftnt(学习中的菜鸟)回复于 2004-08-03 15:46:40 得分 0
有高手能来做答吗?在线等着结贴噢Top




