<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>
<script>
function moves()
{
if(document.getElementById("mq").direction=="left")
{
document.getElementById("mq").direction="right";
}
else
{
document.getElementById("mq").direction="left";
}
}
</script>
<body>
<input type="button" name="Submit" value="left" onClick="moves()">
<marquee dir="ltr" direction="left" id="mq">fsdfsf</marquee>
<input type="button" name="Submit2" value="right" onClick="moves()">
</body>
</html>
怎么写能让它滚动的时候隔一段距离就开始出第二次、第三次。的滚动 而不是字在网页上消失了才开始第二遍 我想让他连续起来滚动
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>
<script>
function moves()
{
if(document.getElementById("mq").direction=="left")
{
document.getElementById("mq").direction="right";
}
else
{
document.getElementById("mq").direction="left";
}
}
</script>
<body>
<input type="button" name="Submit" value="left" onClick="moves()">
<marquee dir="ltr" direction="left" id="mq">fsdfsf</marquee>
<input type="button" name="Submit2" value="right" onClick="moves()">
</body>
</html>
怎么写能让它滚动的时候隔一段距离就开始出第二次、第三次。的滚动 而不是字在网页上消失了才开始第二遍 我想让他连续起来滚动
<HTML>
<HEAD>
<META http-equiv="Content-Type" content="text/html; charset=gb2312">
<TITLE> 水平滚动文字</TITLE>
</HEAD><BODY><TABLE width="96%" border="0" cellspacing="0" cellpadding="0" align="center">
<TR>
<TD> </TD>
</TR><TR>
<TD><MARQUEE behavior="scroll" direction="left" width="700" height="30" scrollamount="6" scrolldelay="1" onMouseOver="this.stop();" onMouseOut="this.start();">
·恭喜"zhang***"福彩3D喜中1000元
·恭喜"kok****"排列3喜中10000元
·恭喜"liz****"排列3喜中5000元
·恭喜"tao****"排列3喜中2000元
·恭喜"apple***"双色球喜中12850元
·恭喜"guoke***"双色球喜中3000元
·恭喜"ilove***"双色球喜中3000元
</MARQUEE></TD>
</TR>
<TR>
<TD> </TD>
</TR>
<TR>
<TD><DIV id=demo style="OVERFLOW: hidden; WIDTH: 700px; HEIGHT: 190px"><TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
<TR>
<TD id=demo1 valign=top><IMG src="image/1.jpg"><IMG src="image/2.gif"><IMG src="image/3.jpg"><IMG src="image/ad-01.jpg"><IMG src="image/ad-02.jpg"><IMG src="image/ad-03.jpg"><IMG src="image/ad-04.jpg"></TD>
<TD id=demo2 valign=top></TD></TR>
</TABLE></DIV></TD>
</TR>
</TABLE>
<SCRIPT>
var speed=10; //设置图片滚动速度
demo2.innerHTML=demo1.innerHTML //复制demo1为demo2
function Marquee(){
if(demo2.offsetWidth-demo.scrollLeft<=0) //当滚动至demo1与demo2交界时
demo.scrollLeft-=demo1.offsetWidth //dome跳到最左端
else{
demo.scrollLeft++
}
}
var MyMar=setInterval(Marquee,speed) //设置定时器
demo.onmouseover=function() {clearInterval(MyMar)} //鼠标移上时清除定时器达到滚动停止的目的
demo.onmouseout=function() {MyMar=setInterval(Marquee,speed)}//鼠标移开时重设定时器,继续滚动
</SCRIPT> </BODY>
</HTML>
var msg="MinTo'Blog,梦随风度的窝!这是用JS脚本写出来的跑马灯哦! ";
var interval = 100;
var space10="";
var seq=0;function Scroll() {
document.tmForm.tmText.value = msg.substring(seq, msg.length) + space10 + msg.substring(0, msg.length);
seq++;seq++;
if ( seq > msg.length ) { seq = 0 };
window.setTimeout("Scroll();", interval );
}html:<FORM Name=tmForm>
<INPUT Type=Text Name=tmText Size=65>
</FORM>在body中加入onload = Scroll()就可以了