藍森林首頁 | 返回主頁 | 本站地圖 | 站內搜索 | 聯繫信箱 |
 您目前的位置:首頁 > 自由軟件 > 技術交流 > 應用編程


    

藍森林 http://www.lslnet.com 2006年8月25日 8:28

求教文字帶連接不間斷滾動效果

在這裡看了很多關於這方面的帖子,但是好像沒有左右滾動,並且帶有鏈接的文字,可以放到table中的效果,請高手賜教!!先謝了!!

怎麼沒人解答!自己頂一下先!

參考
[html]<center>
<script language=JavaScript>

<!-- Begin
var message="JavaScripts,Flashs,Templates-Buy My Products, Click Here!";//Put Your Message Here
function ButtonURL(){
window.location="http://www.e-cn-e.com"
}
function scroll()
{
  message = message.substring(1,message.length) + message.substring(0,1);
  document.bs.bs.value = message;
  setTimeout("scroll()",140);
}
window.onload=scroll
document.write('<style type="text/css">')
document.write('.select{background: #cc0000;border-color:"#eeeeee";color:"white";font-family:Arial,Helvetica,Verdana;font-size:8pt;font-weight: bold;}')
document.write('</STYLE>')
document.write('<form name=bs><INPUT class="select" TYPE="button" NAME="bs" value="" onclick="ButtonURL()"></FORM>')
//  End -->
</script>
[/html]

參考第二個
[html]<div style="width:200px;overflow:hidden">
<div style="position:relative;top:0px;left:0px;white-space:nowrap" id=news>
<span id=nbo>新聞內容1 新聞內容2 新聞內容3 新聞內容4 新聞內容5 新聞內容6 </span>
<script language=javascript>
//重複一次新聞內容
document.write(nbo.innerHTML);
</script>
</div>
</div>
<script language=javascript>
//實現不間斷滾動
function newsScroll()
{
  news.style.pixelLeft=(news.style.pixelLeft-1)%nbo.offsetWidth;
}
timer1=setInterval('newsScroll()',10)  //更改第二個參數可以改變速度,值越小,速度越快。
</script>
[/html]

非常感謝!




Copyright © 1999-2000 LSLNET.COM. All rights reserved. 藍森林網站 版權所有。 E-mail : webmaster@lslnet.com