要实现pjhome.net" target="_blank">pjblog首页友情链接的滚动显示,只需要在pjhome.net" target="_blank">pjblog的link模块中,加入以下代码就可以了:
<div align="center" id="demo" style="overflow:hidden;height:148px;">
<div id="demo1">
<!– 定义内容–>
$Link_Code$
</div>
<div id="demo2"></div>
</div><script language="javascript" type="text/javascript">
<!–
var demo = document.getElementById("demo");
var demo1 = document.getElementById("demo1");
var demo2 = document.getElementById("demo2");
var speed=20; //滚动速度值,值越大速度越慢
demo2.innerHTML = demo1.innerHTML //克隆demo2为demo1
function Marquee(){
if(demo2.offsetTop-demo.scrollTop<=0) //当滚动至demo1与demo2交界时
demo.scrollTop-=demo1.offsetHeight //demo跳到最顶端
else{
demo.scrollTop++
}
}
var MyMar = setInterval(Marquee,speed); //设置定时器
demo.onmouseover = function(){clearInterval(MyMar)} //鼠标经过时清除定时器达到滚动停止的目的
demo.onmouseout = function(){MyMar = setInterval(Marquee,speed)} //鼠标移开时重设定时器
–>
</script>
<div align="right"><a href="bloglink.asp">申请 | 查看多链接… </a></div>