//用按钮控制字幕(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>
Scripting marquee.direction [ =sDirection ]
Possible ValuessDirection String that specifies one of the following values: left Marquee scrolls left.
right Marquee scrolls right.
down Marquee scrolls down.
up Marquee scrolls up.
The property is read/write with a default value of left.Expressions can be used in place of the preceding value(s), as of Microsoft® Internet Explorer 5. For more information, see dynamic properties.