请JS高手帮忙修改,当鼠标放在文字上停止自动播放,离开时再重继续自动播放代码
<!DOCTYPEHTMLPUBLIC"-//W3C//DTDHTML4.0Transitional//EN"><HTML><HEAD><METAcontent="IE=...
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><META content="IE=5.0000" http-equiv="X-UA-Compatible">
<TITLE></TITLE>
<META content="text/html; charset=gb2312" http-equiv=Content-Type>
<STYLE type=text/css>TD {
FONT-SIZE: 12px
}
.rollboder {
BORDER-BOTTOM: #bcbcbc 1px solid; BORDER-LEFT: #bcbcbc 1px solid; BORDER-TOP: #bcbcbc 1px solid; BORDER-RIGHT: #bcbcbc 1px solid
}
.rollleft {
WIDTH: 240px; FLOAT: left
}
.rollcenter {
TEXT-ALIGN: center; BORDER-LEFT: #bcbcbc 1px solid; WIDTH: 30px; BORDER-RIGHT: #bcbcbc 1px solid
}
.rollright {
TEXT-ALIGN: center; WIDTH: 40px; FLOAT: right
}
</STYLE>
<META name=GENERATOR content="MSHTML 8.00.6001.18702"></HEAD>
<BODY>
<SCRIPT type=text/javascript>
<!--
var rollText_k=6;
var rollText_i=1;
rollText_tt=setInterval("rollText(1)",1000);
function rollText(a){
clearInterval(rollText_tt);
rollText_tt=setInterval("rollText(1)",1000);
rollText_i+=a;
if (rollText_i>rollText_k){rollText_i=1;}
if (rollText_i==0){rollText_i=rollText_k;}
//alert(i)
for (var j=1; j<=rollText_k; j++){
document.getElementById("rollTextMenu"+j).style.display="none";
}
document.getElementById("rollTextMenu"+rollText_i).style.display="block";
document.getElementById("pageShow").innerHTML = rollText_i+"/"+rollText_k;
}
//-->
</SCRIPT>
<TABLE class=rollboder border=0 cellSpacing=0 height=29>
<TBODY>
<TR>
<TD class=rollleft height=22>
<DIV class=rollTextMenus>
<DIV style="DISPLAY: block" id=rollTextMenu1>
<A href="#">1111</A>
</DIV>
<DIV style="DISPLAY: none" id=rollTextMenu2>
<A href="#">2222头</A></DIV>
<DIV style="DISPLAY: none" id=rollTextMenu3>
<A href="#">3333</A></DIV>
<DIV style="DISPLAY: none" id=rollTextMenu4>
<A href="#">4444</A></DIV>
<DIV style="DISPLAY: none" id=rollTextMenu5>
<A href="#">5555</A></DIV>
<DIV style="DISPLAY: none" id=rollTextMenu6>
<A href="#">6666</A></DIV>
</DIV></TD><TD id=pageShow class=rollcenter>1/6</TD>
<TD class=rollright><A title=上一条 href="javascript:rollText(-1);">上一条</A>
<A title=下一条 href="javascript:rollText(1);">下一条</A>
</TD></TR></TBODY></TABLE></BODY></HTML> 展开
<HTML><HEAD><META content="IE=5.0000" http-equiv="X-UA-Compatible">
<TITLE></TITLE>
<META content="text/html; charset=gb2312" http-equiv=Content-Type>
<STYLE type=text/css>TD {
FONT-SIZE: 12px
}
.rollboder {
BORDER-BOTTOM: #bcbcbc 1px solid; BORDER-LEFT: #bcbcbc 1px solid; BORDER-TOP: #bcbcbc 1px solid; BORDER-RIGHT: #bcbcbc 1px solid
}
.rollleft {
WIDTH: 240px; FLOAT: left
}
.rollcenter {
TEXT-ALIGN: center; BORDER-LEFT: #bcbcbc 1px solid; WIDTH: 30px; BORDER-RIGHT: #bcbcbc 1px solid
}
.rollright {
TEXT-ALIGN: center; WIDTH: 40px; FLOAT: right
}
</STYLE>
<META name=GENERATOR content="MSHTML 8.00.6001.18702"></HEAD>
<BODY>
<SCRIPT type=text/javascript>
<!--
var rollText_k=6;
var rollText_i=1;
rollText_tt=setInterval("rollText(1)",1000);
function rollText(a){
clearInterval(rollText_tt);
rollText_tt=setInterval("rollText(1)",1000);
rollText_i+=a;
if (rollText_i>rollText_k){rollText_i=1;}
if (rollText_i==0){rollText_i=rollText_k;}
//alert(i)
for (var j=1; j<=rollText_k; j++){
document.getElementById("rollTextMenu"+j).style.display="none";
}
document.getElementById("rollTextMenu"+rollText_i).style.display="block";
document.getElementById("pageShow").innerHTML = rollText_i+"/"+rollText_k;
}
//-->
</SCRIPT>
<TABLE class=rollboder border=0 cellSpacing=0 height=29>
<TBODY>
<TR>
<TD class=rollleft height=22>
<DIV class=rollTextMenus>
<DIV style="DISPLAY: block" id=rollTextMenu1>
<A href="#">1111</A>
</DIV>
<DIV style="DISPLAY: none" id=rollTextMenu2>
<A href="#">2222头</A></DIV>
<DIV style="DISPLAY: none" id=rollTextMenu3>
<A href="#">3333</A></DIV>
<DIV style="DISPLAY: none" id=rollTextMenu4>
<A href="#">4444</A></DIV>
<DIV style="DISPLAY: none" id=rollTextMenu5>
<A href="#">5555</A></DIV>
<DIV style="DISPLAY: none" id=rollTextMenu6>
<A href="#">6666</A></DIV>
</DIV></TD><TD id=pageShow class=rollcenter>1/6</TD>
<TD class=rollright><A title=上一条 href="javascript:rollText(-1);">上一条</A>
<A title=下一条 href="javascript:rollText(1);">下一条</A>
</TD></TR></TBODY></TABLE></BODY></HTML> 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询