首页 新闻 会员 周边 捐助

如何将从数据库里查询出来的图片在页面上轮换的现实出来

0
悬赏园豆:5 [已关闭问题]

  <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="10">&nbsp;</td>
                <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td width="498" height="287" valign="top" background="images/index_08.jpg"><table width="499" border="0" cellspacing="0" cellpadding="0">
                      <tr>
                        <td width="15" height="20">&nbsp;</td>
                        <td width="466">&nbsp;</td>
                        <td width="18">&nbsp;</td>
                      </tr>
                      <tr>
                        <td height="250">&nbsp;</td>
                        <td>
                        <!--JS脚本1--开始-->
<script type="text/javascript">
imgUrl1="images/01.jpg";
imgtext1="线路01"
imgLink1=escape("#");
imgUrl2="images/02.jpg";
imgtext2="线路02"
imgLink2=escape("#");
imgUrl3="images/03.jpg";
imgtext3="线路03"
imgLink3=escape("#");
imgUrl4="images/04.jpg";
imgtext4="线路04"
imgLink4=escape("#");
imgUrl5="images/05.jpg";
imgtext5="线路05"
imgLink5=escape("#");

 var focus_width=466
 var focus_height=250
 var text_height=0
 var swf_height = focus_height+text_height
 
 var pics=imgUrl1+"|"+imgUrl2+"|"+imgUrl3+"|"+imgUrl4+"|"+imgUrl5
 var links=imgLink1+"|"+imgLink2+"|"+imgLink3+"|"+imgLink4+"|"+imgLink5
 var texts=imgtext1+"|"+imgtext2+"|"+imgtext3+"|"+imgtext4+"|"+imgtext5
 
 document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+ focus_width +'" height="'+ swf_height +'">');
 document.write('<param name="allowScriptAccess" value="sameDomain"><param name="movie" value="images/focus1.swf"><param name="quality" value="high"><param name="bgcolor" value="#F0F0F0">');
 document.write('<param name="menu" value="false"><param name=wmode value="opaque">');
 document.write('<param name="FlashVars" value="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'">');
 document.write('</object>');
 </script>
<!--JS脚本1--结束-->
                        </td>
                        <td>&nbsp;</td>
                      </tr>
                    </table>

这个是那段页面代码

shy0527的主页 shy0527 | 初学一级 | 园豆:195
提问于:2010-06-15 12:30
< >
分享
其他回答(2)
0

不知道你要问些什么东西

loolda | 园豆:8 (初学一级) | 2010-06-16 12:42
0

参考:http://space.cnblogs.com/question/9064/

Astar | 园豆:40805 (高人七级) | 2010-06-17 10:21
0

后台写一个类,

public static DataTable xxBind()

{

查询返回DataTable;

}

前台这样用

<%=for(int i=0; i<xxBind.Rows.Count;i++){%>

 

imgUrl1="<%=xxBind().Rows[i]["你的数据库字段"]%>";
imgtext1="<%=xxBind().Rows[i]["你的数据库字段"]%>";

<%}%>

I don't bird you | 园豆:18 (初学一级) | 2010-06-17 13:47
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册