作者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