作者knives ()
看板Ajax
标题[请问] 这个要怎麽一次只显示一个
时间Mon Jun 7 18:03:28 2010
※ [本文转录自 EZsoft 看板 #1C3CF9Vh ]
作者: knives () 看板: EZsoft
标题: [请问] 这个要怎麽一次只显示一个
时间: Mon Jun 7 18:02:46 2010
<div id="hot_news">
<p style=" "><a href="
http://tw.yahoo.com">第一个</a></p>
<p style=" "><a href="
http://www.google.com.tw">第二个</a></p>
<p style=" "<a href="
http://www.yam.com.tw" >第三个</a></p>
<p style=" "><a href="
http://www.yam.com.tw" >第四个</a></p>
</div>
我的js
function marquee()
{
var container=document.getElementById("hot_news");
container.appendChild(container.firstChild);
}
setInterval("marquee()",3000);
这样子会产生类似跑马灯的效果
但是我要怎麽样才能够一次只显示一个
另外如果换用jquery写要怎麽写阿
谢谢
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 122.117.39.194
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 122.117.39.194