山西大学商务学院博客

山西大学商务学院毕业生的山西的黄荣seo实验室

导航

« [视频]内向大学教师怒杀女友后跳楼百度越来越重视UE,做seo从UE开始. »

网页中图片无限循环滚动

以下代码是在PHP中实现的:

inc.php

function linklist_new($sexd)
{
?>
<div id=divlink style="overflow:hidden;height:<?=$sexd?>px;" onmouseover="ii=1" onmouseout="ii=0">
<div id=divlink1>
<table width="100%" height="146%" border="0">
  <tr><td height="25" align="center"><a href="http://www.0351x.com" target="_blank"><img src="logo/logo0.gif" width="212" height="56" align="middle" style="border:1px solid #cccccc" /></a></td>
  </tr>
  <tr><td height="25" align="center"><a href="http://0354.fangwu365.com" target="_blank"><img src="logo/tysx.gif" width="212" height="56" align="middle" style="border:1px solid #cccccc"></a></td>
  </tr>
   <tr><td height="25" align="center"><a href="http://www.cnc.cn" target="_blank"><img src="logo/cnc.gif" width="212" height="56" style="border:1px solid #cccccc"></a></td>
  </tr>
  <tr><td height="25" align="center"><a href="http://www.9zpx.com" target="_blank"><img src="logo.gif" width="212" height="56" align="middle" style="border:1px solid #cccccc"></a></td>
  </tr>
  <tr><td height="25" align="center"><a href="http://www.sxstu.cn" target="_blank"><img src="logo/logosxstu.gif" width="212" height="56" style="border:1px solid #cccccc"></a></td>
  </tr>
  <tr><td height="25" align="center"><a href="http://www.sxzzz.cn" target="_blank"><img src="logo/logosxzzz.cn.gif" width="212" height="56" style="border:1px solid #cccccc"></a></td>
  </tr>
  <tr><td height="25" align="center"><a href="http://www.fangwu365.com" target="_blank"><img src="logo/logofangwu365.gif" width="212" height="56" align="middle" style=" border:1px solid #cccccc"></a></td>
  </tr>
  <tr><td height="25" align="center"><a href="http://www.tyfenlei.com" target="_blank"><img src="logo/logotyfenlei.gif" width="212" height="56" style=" border:1px solid #cccccc"></a></td>
  </tr>
</table>
</div>
<div id=divlink2></div>
</div>
<script>
var ii=0;t=divlink.scrollTop
divlink2.innerHTML=divlink1.innerHTML
function qswhMarquee(){
if (ii==1)return
if(divlink2.offsetTop-divlink.scrollTop<=0)
divlink.scrollTop-=divlink1.offsetHeight
else
divlink.scrollTop++
}
setInterval(qswhMarquee,80)
</script>
   <?
}

marqueeDemo.php

<table width="100%"  border="0" cellpadding="0" cellspacing="0" class="all">
                <tr>
                  <td style="padding:1px; "><table width="100%"  border="0" cellspacing="0" cellpadding="0">
                      <tr>
                        <td width="10" bgcolor="#FF7B05">&nbsp;</td>
                        <td height="23" bgcolor="#FF7B05" class="font_14w"><B>合作单位</B></td>
                      </tr>
                  </table></td>
                </tr>
                <tr>
                  <td height="193" align="center" valign="middle">
                    <div align="left">
                      <?
                      linklist(303)
                     ?>
                      </div></td>
                </tr>
          </table>

  • 相关文章:

发表评论:

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

Tags

日历

最新评论及回复

最近发表

Powered By 山西大学商务学院 Using 黄荣 Designed By 黄荣博客

Copyright 山西大学商务学院博客 www.huangrong.org.cn. Rights Reserved.