用按钮控制字幕(marquee)的属性
<marquee id=mm direction="right" scrolldelay="70" scrollamount="6">meizz</marquee><br>
<input type=button value=加速 onclick="add()">
<input type=button value=减速 onclick="sub()">
<input type=button value=right onclick="e.direction='right'">
<input type=button value=left onclick="e.direction='left'">
<input type=button value=up onclick="e.direction='up'">
<input type=button value=down onclick="e.direction='down'">
<script language="JavaScript"><!--
var e = document.getElementById("mm");
function add()
{
var n = 10;
if(e.scrollDelay-n > 0)
e.scrollDelay -= n;
e.scrollAmount += 1;
}
function sub()
{
if(e.scrollAmount > 0)
e.scrollAmount -= 1;
e.scrollDelay += 10;
}
//--></script>
<marquee id=mm direction="right" scrolldelay="70" scrollamount="6">meizz</marquee><br>
<input type=button value=加速 onclick="add()">
<input type=button value=减速 onclick="sub()">
<input type=button value=right onclick="e.direction='right'">
<input type=button value=left onclick="e.direction='left'">
<input type=button value=up onclick="e.direction='up'">
<input type=button value=down onclick="e.direction='down'">
<script language="JavaScript"><!--
var e = document.getElementById("mm");
function add()
{
var n = 10;
if(e.scrollDelay-n > 0)
e.scrollDelay -= n;
e.scrollAmount += 1;
}
function sub()
{
if(e.scrollAmount > 0)
e.scrollAmount -= 1;
e.scrollDelay += 10;
}
//--></script>
<html>
<head>
<title> New Document </title>
<meta name="Generator" content="EditPlus">
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
</head><body>
<marquee id="test" direction="down">asdfsd</marquee>
<input type=button onclick="document.all.test.direction = 'down';document.all.test.start();" value="down">
<input type=button onclick="document.all.test.stop();" value="stop">
<input type=button onclick="document.all.test.direction = 'up';document.all.test.start();" value="up">
</body>
</html>
<p></p>
<input onclick="marqueeimg.stop()" type="button" value="暂停"><input onclick="marqueeimg.start();marqueeimg.direction='up'" type="button" value="向上">
<input onclick="marqueeimg.start();marqueeimg.direction='down'" type="button" value="向下">
<input type=button onclick="document.all.test.direction = 'down';document.all.test.start();" value="down">
<input type=button onclick="document.all.test.stop();" value="stop">
<input type=button onclick="document.all.test.direction = 'up';document.all.test.start();" value="up">
<marquee id="test" direction="down" BEHAVIOR="slide" >asdfsd<br>asdfasdf</marquee>
调速度见1楼