注册 登录
编程论坛 ASP技术论坛

今天有技术问题要讨论~~关于多图片显示的网页

dissun 发布于 2009-10-26 16:54, 1193 次点击
最近发现有些问题。

就是...直接看链接好了
http://newweb758403.zj13.host.
这个页面右边有个“精彩图集”,就因为这个玩意,整个网页看起来,像没装显卡驱动似。
代码是这样的:

程序代码:
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="kuang1">
                  <tr>
                    <td height="27" background="images/righttitle1-bj.jpg" style="padding:0px 10px 0px 10px"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                          <td width="17"><img src="images/icona.jpg" width="17" height="27"></td>
                          <td width="10"></td>
                          <td align="left" style="font-weight:bold; color:#146900; font-size:14px">精彩图集</td>
                          <td align="right">&nbsp;</td>
                        </tr>
                    </table></td>
                  </tr>
                  <tr>
                  <td align="left" valign="top" style="padding:10px"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<%
//********精彩图集
set pic=Server.CreateObject("adodb.recordset")
Randomize
psql="select id,image from news where class_1='1' and disp='1' order by rnd(-(id+" & rnd() & "))"
pic.open psql,conn,0,2


%>
                      <tr>
                        <td><a href="pic_Details.asp?id=<%=pic("id")%>"><%
                        if pic("image")<>"not" then
                        response.write "<img src='www/"&pic("image")&"' width='149' height=125 border=0>"
                        else
                        response.write "<img src='' width='149' height=125 border=0>"
                        end if
                        pic.movenext
                        %></a></td>
                        <td width="10">&nbsp;</td>
                        <td><a href="pic_Details.asp?id=<%=pic("id")%>"><%
                        if pic("image")<>"not" then
                        response.write "<img src='www/"&pic("image")&"' width='149' height=125 border=0>"
                        else
                        response.write "<img src='' width='149' height=125 border=0>"
                        end if
                        pic.movenext
                        %></a></td>
                      </tr>
                      <tr>
                        <td height="10" colspan="3"></td>
                      </tr>
                    </table>
                      <table width="100%" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                        <td><a href="pic_Details.asp?id=<%=pic("id")%>"><%
                        if pic("image")<>"not" then
                        response.write "<img src='www/"&pic("image")&"' width='149' height=125 border=0>"
                        else
                        response.write "<img src='' width='149' height=125 border=0>"
                        end if
                        pic.movenext
                        %></a></td>
                        <td width="10">&nbsp;</td>
                        <td><a href="pic_Details.asp?id=<%=pic("id")%>"><%
                        if pic("image")<>"not" then
                        response.write "<img src='www/"&pic("image")&"' width='149' height=125 border=0>"
                        else
                        response.write "<img src='' width='149' height=125 border=0>"
                        end if
                        pic.movenext
                        %></a></td>
                      </tr>
                        <tr>
                          <td height="10" colspan="3"></td>
                        </tr>
                      </table>
                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                        <td><a href="pic_Details.asp?id=<%=pic("id")%>"><%
                        if pic("image")<>"not" then
                        response.write "<img src='www/"&pic("image")&"' width='149' height=125 border=0>"
                        else
                        response.write "<img src='' width='149' height=125 border=0>"
                        end if
                        pic.movenext
                        %></a></td>
                        <td width="10">&nbsp;</td>
                        <td><a href="pic_Details.asp?id=<%=pic("id")%>"><%
                        if pic("image")<>"not" then
                        response.write "<img src='www/"&pic("image")&"' width='149' height=125 border=0>"
                        else
                        response.write "<img src='' width='149' height=125 border=0>"
                        end if
                        pic.movenext
                        %></a></td>
                      </tr>
                        <tr>
                          <td height="10" colspan="3"></td>
                        </tr>
                      </table>
                      <table width="100%" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                        <td><a href="pic_Details.asp?id=<%=pic("id")%>"><%
                        if pic("image")<>"not" then
                        response.write "<img src='www/"&pic("image")&"' width='149' height=125 border=0>"
                        else
                        response.write "<img src='' width='149' height=125 border=0>"
                        end if
                        pic.movenext
                        %></a></td>
                        <td width="10">&nbsp;</td>
                        <td><a href="pic_Details.asp?id=<%=pic("id")%>"><%
                        if pic("image")<>"not" then
                        response.write "<img src='www/"&pic("image")&"' width='149' height=125 border=0>"
                        else
                        response.write "<img src='' width='149' height=125 border=0>"
                        end if
                        pic.movenext
                        %></a></td>
                      </tr>
                        <tr>
                          <td height="10" colspan="3"></td>
                        </tr>
                      </table>
                    </td>
                  </tr>
              </table>



这些图是经过JAVASCRIP处理的,显示时缩小,也许跟图片太大有关系。

后来做这种网页时,就用 “缩略图aspjpeg”组件,先把图片处理小了,再显示,可是每次开网页都会闪一下

也给个链接
http://www.

也不知是该怎么改。

我看了一些大型的网站,不知他们怎么实现的,很稳定。
比如搜狐这个:
http://pic.

5 回复
#2
yms1232009-10-26 17:11
http://pic.
搜狗的这个页面?这个页面是使用Ajax技术来实现的,你提供的那几个都是普通效果实现的。
搜狗的就是Ajax分页技术应用的另外一种表现形式。
#3
tang6882009-10-26 17:15
晕,二个网站都是同一毛病,只是把大的图片显示小了,第二个网站没有把图片直接缩小到位,所以先显示大的然后跳到小的
建议上传时把图片缩小,就aspjpeg就可以.但注意,显示时指向小图片
#4
tang6882009-10-26 17:22
类似于你说的网站我做过这样的显示:
http://www.
#5
dissun2009-10-27 14:21
回复 2楼 yms123
不是我不愿意缩小到位,问题是一张图片在三个地方,有三种尺寸,太烦了,所以才借助了js来缩小。

看来是不能偷懒啊。。。
#6
aspic2009-10-27 14:35
这个就是设计初期的问题了
1