woff 發表於 2008-9-23 20:37:49

公告+廣告結合可停止捲動跑馬燈

1.第一部份插入 HAND 與 /HAND 中間 <script language="JavaScript">
<!--
var ostat = false;
function scrollstop() {
news.scrollAmount = 0;
ostat = true;
}
function scrollplay() {
news.scrollAmount = 5;
ostat = false;
}
function scrolldir() {
mid = screen.width / 2;
mouse = event.x;
if(mouse > mid) {
if(ostat == false) {
speed = (mouse - mid) / 10;
news.scrollAmount = speed;
}
news.direction = "down";
}
else {
if(ostat == false) {
speed = (mid - mouse) / 10;
news.scrollAmount = speed;
}
news.direction = "up";
   }
}
-->
</script>
1.第二部份插入 BODY 與 /BODY 中間 <marquee name=news id=news scrolldelay="5" scrollamount="2" direction="up" width="738" height="80" onmouseover="scrollstop()" onmouseout="scrollplay()" onMouseMove="scrolldir()">



<table border="2" width="733" id="table1" bordercolor="#1C3A77">
      <tr>
                <td>
<font color="#FF0000" size="4">由於原xoops論壇出現不穩定狀態,故決定尋求更穩定快速的論壇軟體,由20080805起<br>本站開始測試Discuz6.1,舊站請</font></font><font size="4"><a style="FONT-WEIGHT: bold; COLOR: #ff6699" target="_blank" href="http://p5.no-ip.org/xoops2013/index.php">由此連結</a></font>
                </td>
      </tr>
</table>
<br><br><script type="text/javascript"><!--
google_ad_client = "pub-2850225043597831";
/* 728x90, 已建立 2008/5/17 */
google_ad_slot = "3809147423";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>


</marquee>
頁: [1]
查看完整版本: 公告+廣告結合可停止捲動跑馬燈