喜悦国际村 
» 游客:  注册 | 登录 | 搜索 | 统计 | 喜悦证交所 | 帮助

RSS 订阅当前论坛  

[北京]代朋友公司招聘PHP高级程序员多名

上一主题 下一主题
     
标题: [问题] 图片轮换的两次调用问题  
 
nightwindw
中级会员
Rank: 3Rank: 3
中级会员



UID 29552
精华 0
积分 246
帖子 246
金钱 246 喜悦币
威望 0
人脉 0
阅读权限 30
注册 2004-6-22
状态 离线
图片轮换的两次调用问题

<?
        include "config.inc.php";       
                     $link = @mysql_connect($host,$dbuser,$dbpass) or die('无法连接服务器');
                     @mysql_select_db(picture,$link) or die('无法连接数据库');
        mysql_query("SET   NAMES   GB2312");
        $sql="select * from picture order by pic_djl desc limit 0,5";
        @$result = mysql_query($sql,$link) or die('MYSQL出错,查询失败!');
        $i=0;
        $pic = array("0","1","2","3","4");
        while( $row = mysql_fetch_array($result))
     {
          
                $pictm=$row[pic_ratio];
                $pic[$i]=substr($pictm,12);
               
                $i++;

          }

?>
<div id=oTransContainer
style="FILTER: progidXImageTransform.Microsoft.Wipe(GradientSize=1.0,wipeStyle=0, motion='forward'); WIDTH: 165px; HEIGHT: 103px"><a
href="http://xxxx"
target=_blank><img class=pic id=oDIV1
style="BORDER-RIGHT: white 1px solid; BORDER-TOP: white 1px solid; BORDER-LEFT: white 1px solid; BORDER-BOTTOM: white 1px solid"
height=120 src="<? echo $pic[0] ?>"
width=150 border=0>
        <script>var NowFrame = 1;var MaxFrame = 5;var bStart = 0;function fnToggle(){var next = NowFrame + 1;if(next == MaxFrame+1) {NowFrame = MaxFrame;next = 1;}if(bStart == 0){bStart = 1;setTimeout('fnToggle()', 2000);return;}else{oTransContainer.filters[0].Apply();document.images['oDIV'+next].style.display = "";document.images['oDIV'+NowFrame].style.display = "none";oTransContainer.filters[0].Play(duration=2);if(NowFrame == MaxFrame){NowFrame = 1;}else{NowFrame++;}} setTimeout('fnToggle()', 6000);}fnToggle();</script>
        </a><a
href="http://xxxx"
target=_blank><img class=pic id=oDIV2
style="BORDER-RIGHT: white 1px solid; BORDER-TOP: white 1px solid; DISPLAY: none; BORDER-LEFT: white 1px solid; BORDER-BOTTOM: white 1px solid"
height=120 src="<? echo $pic[1] ?>"
width=150 border=0></a><a
href="http://xxxx"
target=_blank><img class=pic id=oDIV3
style="BORDER-RIGHT: white 1px solid; BORDER-TOP: white 1px solid; DISPLAY: none; BORDER-LEFT: white 1px solid; BORDER-BOTTOM: white 1px solid"
height=120 src="<? echo $pic[2] ?>"
width=150 border=0></a><a
href="http://xxxx"
target=_blank><img class=pic id=oDIV4
style="BORDER-RIGHT: white 1px solid; BORDER-TOP: white 1px solid; DISPLAY: none; BORDER-LEFT: white 1px solid; BORDER-BOTTOM: white 1px solid"
height=120 src="<? echo $pic[3] ?>"
width=150 border=0></a><a
href="http://xxxx"
target=_blank><img class=pic id=oDIV5
style="BORDER-RIGHT: white 1px solid; BORDER-TOP: white 1px solid; DISPLAY: none; BORDER-LEFT: white 1px solid; BORDER-BOTTOM: white 1px solid"
height=120 src="<? echo $pic[4];?>"
width=150 border=0></a></div>

代码如上。我想在同一个页面里两次调用这个代码。发现只能调用一次,调用两次就不能轮换了,我对这些非PHP代码不是很懂,请指教一二。谢谢
2008-4-8 02:56 PM#1
查看资料  发短消息  QQ  顶部
     


  可打印版本 | 推荐给朋友 | 订阅主题 | 收藏主题 | 开通个人空间  


 




Powered by Discuz! 6.1.0  © 2001-2010 Comsenz Inc.
Processed in 0.023232 second(s), 6 queries

(冀ICP备05009913号) 管理员:sadly 邮箱/MSN: sadly@phpx.com QQ:824008(长隐) 清除 Cookies - - Archiver - WAP