蓝森林首页 | 返回主页 | 本站地图 | 站内搜索 | 联系信箱 |
 您目前的位置:首页 > 自由软件 > 技术交流 > 应用编程


    

蓝森林 http://www.lslnet.com 2006年8月25日 8:28

MARQUEE

自己最近写了这段,发现达不到要求。请教各位大侠,怎么改这段代码可以变成。字母一开始是不动的,然后再鼠标放在"UP"或是"DOWN"才上下动呢?

[html]
<script language="javaScript">
<!--//
function out(dir,id)
{
        id.trueSpeed = true;
        id.direction =dir;
        id.scrollAmount=1;
        id.scrollDelay=50;
        id.stop();
        id.start();
}

function scroll(dir,speed,id)
{
        id.trueSpeed = true;
        id.direction = dir;
        id.scrollAmount=1;
        id.scrollDelay=speed;
        id.stop();
        id.start();
}
//-->
</script>
<MARQUEE direction="up" id="scrolltext1" onMouseOut="this.start()" onMouseOver="this.stop()" scrollAmount="1" scrollDelay="50" name="scrolltext">
<table border="0" cellspacing="2" style="width:100%">
<tr><td>1234</td></tr>
<tr><td>4567</td></tr>
<tr><td>90-[=</td></tr>
</table>
</MARQUEE>
<A href="javascript:;" onMouseOut="out('up',scrolltext1)" onMouseOver="scroll('down',10,scrolltext1)">UP</A>
<A href="javascript:;" onMouseOut="out('up',scrolltext1)" onMouseOver="scroll('up',10,scrolltext1)">Down</A>
[/html]

各位兄弟帮忙啊。。。

[html]
<script language="javaScript">
<!--//
function out(dir,id)
{
        id.trueSpeed = true;
        id.direction =dir;
        id.scrollAmount=1;
        id.scrollDelay=50;
         id.behavior="scroll";
        id.stop();
        id.start();
        StopM();
}

function scroll(dir,speed,id)
{
        id.trueSpeed = true;
        id.direction = dir;
        id.scrollAmount=1;
        id.scrollDelay=speed;
    id.behavior="scroll";
        id.stop();
        id.start();

}

function StopM(){
scrolltext1.behavior="slide";
scrolltext1.scrollAmount="1000000000" ;
scrolltext1.scrollDelay="50";
}
//-->
</script>
<MARQUEE direction="up" id="scrolltext1" onMouseOut="this.start()" onMouseOver="this.stop()"  name="scrolltext">
<table border="0" cellspacing="2" style="width:100%">
<tr><td>1234</td></tr>
<tr><td>4567</td></tr>
<tr><td>90-[=</td></tr>
</table>
</MARQUEE>
<SCRIPT LANGUAGE="JavaScript">
<!--
StopM()
//-->
</SCRIPT>
<A href="javascript:;" onMouseOut="out('up',scrolltext1)" onMouseOver="scroll('down',10,scrolltext1)">UP</A>
<A href="javascript:;" onMouseOut="out('up',scrolltext1)" onMouseOver="scroll('up',10,scrolltext1)">Down</A>

[/html]

謝謝olddig兄!
原來這樣可以讓它停住,謝謝!

不必客气,共同进步




Copyright © 1999-2000 LSLNET.COM. All rights reserved. 蓝森林网站 版权所有。 E-mail : webmaster@lslnet.com