js文本连续不断地滚动 多行文本连续向下滚动并自动暂停后再滚动请求js代码,兼容多种浏览器Jquery代码更好!最好完整代码,可以直接copy的 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 1.在</body>前加入如下代码:<script language=javascript>var msg = "标题栏上的跑马灯效果";var speed = 500;var msgud = " " + msg;function titleScroll() {if (msgud.length <msg.length) msgud += " - " + msg;msgud = msgud.substring(1, msgud.length);document.title = msgud.substring(0,msg.length);window.setTimeout("titleScroll()",speed);}</script>2.将<body>改为<body onload="window.setTimeout('titleScroll()',500)"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>无标题文档</title></head><body><div id="container" style="overflow:hidden;height:60px;width:200px;"> <div id="content"> <ul> <li><a href="#">test1</a></li> <li><a href="#">test2</a></li> <li><a href="#">test3</a></li> <li><a href="#">test4</a></li> <li><a href="#">test5</a></li> <li><a href="#">test6</a></li> <li><a href="#">test7</a></li> <li><a href="#">test8</a></li></ul></div> <div id="content2"></div> </div> <script type="text/javascript"> var speed=40; var content=document.getElementById("content");var content2=document.getElementById("content2");var container=document.getElementById("container");content2.innerHTML=content.innerHTML; container.scrollTop=container.scrollHeight; function Marquee(){ if(content.offsetTop-container.scrollTop>=0) container.scrollTop+=content2.offsetHeight; else container.scrollTop--; } var scrollcnt=setInterval(Marquee,speed); container.onmouseover=function() { clearInterval(scrollcnt); } container.onmouseout=function() { scrollcnt=setInterval(Marquee,speed);} </script></body></html> js统计图使用 加急!Json异常,望高手指点~ 急。急。网页右侧可以上下移动的图片广告条js代码(就是对联广告,我只要右侧的就可以) 在线等,如何传参数(tes""t-') 关于一些 HTML 和 jscript 的问题,牛人进? 求助JAVASCRIP代码问题 小第有个问题 懂javascript的过来看段代吗。我怎么看不明白啊。 在javascript中怎样得到当前的年份? 下拉列表框动态加载option jsp中鼠标离开时自动提交数据 如何在新窗体中打开
var msg = "标题栏上的跑马灯效果";
var speed = 500;
var msgud = " " + msg;
function titleScroll() {
if (msgud.length <msg.length) msgud += " - " + msg;
msgud = msgud.substring(1, msgud.length);
document.title = msgud.substring(0,msg.length);
window.setTimeout("titleScroll()",speed);
}</script>
2.将<body>改为<body onload="window.setTimeout('titleScroll()',500)">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
</head><body>
<div id="container" style="overflow:hidden;height:60px;width:200px;">
<div id="content">
<ul>
<li><a href="#">test1</a></li>
<li><a href="#">test2</a></li>
<li><a href="#">test3</a></li>
<li><a href="#">test4</a></li>
<li><a href="#">test5</a></li>
<li><a href="#">test6</a></li>
<li><a href="#">test7</a></li>
<li><a href="#">test8</a></li>
</ul>
</div>
<div id="content2"></div>
</div>
<script type="text/javascript">
var speed=40;
var content=document.getElementById("content");
var content2=document.getElementById("content2");
var container=document.getElementById("container");
content2.innerHTML=content.innerHTML;
container.scrollTop=container.scrollHeight;
function Marquee()
{
if(content.offsetTop-container.scrollTop>=0)
container.scrollTop+=content2.offsetHeight;
else
container.scrollTop--; }
var scrollcnt=setInterval(Marquee,speed);
container.onmouseover=function() {
clearInterval(scrollcnt);
}
container.onmouseout=function() {
scrollcnt=setInterval(Marquee,speed);
}
</script>
</body>
</html>