变换显示数据库图片(2/3)

<!--
FLASH样式
本例可以设置TOP的数字,从而可以动态控制图象的数量
 -->
<!--#include file="inc/conn.asp"-->
<%Set rs=Server.CreateObject("ADODB.Recordset")
sql="select top 5 * from product  where elite=true order by updatetime desc"
rs.open sql,conn,1,1%>
<DIV style="DISPLAY: none">
<TABLE id=pictable cellSpacing=0 cellPadding=0 width="100%" border=0>
  <TBODY>
  <%do while not rs.eof
    %>
  <TR>
 
    <TD><%=rs("bookpic")%></TD>
    <TD><%=rs("product_id")%></TD>
    <TD>productshow.asp?articleid=<%=rs("articleid")%></TD></TR>
  <%rs.movenext
  Loop
  rs.close%>
  </TBODY></TABLE></DIV>
<SCRIPT type=text/javascript>
 <!--
 
 var focus_width=550;//图象的宽度
 var focus_height=145;//图象的高度
 var text_height=25;//文字高度
 var swf_height = focus_height+text_height;
 var t=document.getElementById("pictable");
 var rl=t.rows.length;
 var baseu= document.URL.replace(/(http.*//)(.*)/, "$1");
 var pics=""; var links=""; var texts="";
 for (var i=0;i<rl;i++) {
  pics+=baseu+t.rows[i].cells[0].innerText.replace(///.*///, "")+"|";
  links+=t.rows[i].cells[2].innerText+"|";
  texts+=t.rows[i].cells[1].innerText+"|";
 }
 pics=pics.substr(0,pics.length-1);
 links=links.substr(0,links.length-1);
 texts=texts.substr(0,texts.length-1);
 var fv="pics="+pics+"&links="+links+"&texts="+texts+"&borderwidth="+focus_width+"&borderheight="+focus_height+"&textheight="+text_height;
 document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="'+focus_width+'" height="'+swf_height+'">');
 document.write('<param name="movie" value="test/pv.swf"> <param name="quality" value="high"><param name="allowScriptAccess" value="sameDomain"><param name="menu" value="false"><param name="bgcolor" value="#ffffff"><param name="wmode" value="opaque">');
 document.write('<param name="flashvars" value="'+fv+'"></object>');


 //-->
 </SCRIPT>

 Pv.swf需要的发邮件给我,或者在这里留言.

转载于:https://www.cnblogs.com/ajuanabc/archive/2006/08/14/2463926.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值