Apr
22
史上最精简的JS单行新闻滚动代码(兼容IE6,7,8,FIREFOX)
tommyhu , 16:21 , 奇趣网络信息 , Comments(2) , Trackbacks(0) , Reads(12720) , Via Original
Large | Medium | Small


史上最精简的JS单行新闻滚动代码(兼容IE6,7,8,FIREFOX) 点击查看DEMO
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>史上最精简的平滑的JS新闻单行滚动代码 tommyhu.Cn</title>
<style>
a{display:block;line-height:18px;text-decoration:none;color:#555;font-family:Arial;font-size:12px;}
#scroll{
height:18px;
overflow:hidden;
}
</style>
</head>
<body>
<div id="scroll">
<a href="http://tommyhu.cn/">Emotional story(情感故事) [351] </a>
<a href="http://tommyhu.cn/">Happy smile(开心一笑) [46] </a>
<a href="http://tommyhu.cn/">tommy's life(我的生活) [162] </a>
<a href="http://tommyhu.cn/">ASP code(代码片段) [120] </a>
<a href="http://tommyhu.cn/">PHP code(代码片段) [35]</a>
</div>
</body>
<script>
var c,_=Function;
with(o=document.getElementById("scroll")){ innerHTML+=innerHTML; onmouseover=_("c=1"); onmouseout=_("c=0");}
(F=_("if(#%18||!c)#++,#%=o.scrollHeight>>1;setTimeout(F,#%18?10:1500);".replace(/#/g,"o.scrollTop")))();
</script>
</html>
▲返回顶部
Last modified by tommyhu on2010/04/22 16:23
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>史上最精简的平滑的JS新闻单行滚动代码 tommyhu.Cn</title>
<style>
a{display:block;line-height:18px;text-decoration:none;color:#555;font-family:Arial;font-size:12px;}
#scroll{
height:18px;
overflow:hidden;
}
</style>
</head>
<body>
<div id="scroll">
<a href="http://tommyhu.cn/">Emotional story(情感故事) [351] </a>
<a href="http://tommyhu.cn/">Happy smile(开心一笑) [46] </a>
<a href="http://tommyhu.cn/">tommy's life(我的生活) [162] </a>
<a href="http://tommyhu.cn/">ASP code(代码片段) [120] </a>
<a href="http://tommyhu.cn/">PHP code(代码片段) [35]</a>
</div>
</body>
<script>
var c,_=Function;
with(o=document.getElementById("scroll")){ innerHTML+=innerHTML; onmouseover=_("c=1"); onmouseout=_("c=0");}
(F=_("if(#%18||!c)#++,#%=o.scrollHeight>>1;setTimeout(F,#%18?10:1500);".replace(/#/g,"o.scrollTop")))();
</script>
</html>
▲返回顶部
Last modified by tommyhu on2010/04/22 16:23
赞一个