<! Doctype HTML public "-// W3C // dtd xhtml 1.0 transitional // en" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<HTML xmlns = "http://www.w3.org/1999/xhtml">
<Head>
<Title> No title page </title>
</Head>
<Body>
<Div style = "width: 400px; Height: 23px; overflow: hidden; Background-color: Red">
<Div id = "noticev2" style = "white-space: nowrap;" onmouseover = "javascript: ismove = false" onmouseout = "javascript: ismove = true">
<A target = "_ blank" href = "http://zhidao.baidu.com/question/42884976.html? Fr = qrl "> what is JavaScript </a> <br>
<A target = "_ blank" href = "http://zhidao.baidu.com/question/41573038.html? Fr = qrl "> JavaScript Form Verification </a> <br>
<A target = "_ blank" href = "http://zhidao.baidu.com/question/37308454.html? Fr = qrl ">
What is the use of event objects in JavaScript? </A> <br>
<A target = "_ blank" href = "http://zhidao.baidu.com/question/35464099.html? Fr = qrl ">
Let's see what went wrong with JavaScript. Why can't I run it? </a> <br>
<A target = "_ blank" href = "http://zhidao.baidu.com/question/34079794.html? Fr = qrl ">
Javascript Form Verification: How to restrict the user password from entering only lowercase letters and underscores... </a>
</Div>
</Div>
<SCRIPT>
VaR tid;
VaR tn;
VaR nstoptime= 3000
VaR nspeed = 50
VaR ismove = true;
VaR nheight = 20;
VaR NS = 0
VaR nnewscount = 0
Function movet (N)
{
Cleartimeout (TID)
VaR noticev2 = Document. getelementbyid ("noticev2 ")
If (N)
{
Noticev2.style. lineheight = nheight + "PX ";
VaR thetext = noticev2.innerhtml. tolowercase ();
Nnewscount = thetext. Split ("<br>"). Length
Noticev2.innerhtml + = "<br>" + noticev2.innerhtml;
Tn = nheight;
}
NS = nspeed;
If (ismove)
{
Noticev2.style. margintop = tn + "PX ";
If (tn-2) % nheight = 0)
{
NS = nspeed + nstoptime;
}
TN --;
If (math. Abs (TN) = (nnewscount * nheight * 2-nheight ))
Tn = (nNewsCount-1) * nheight *-1;
}
Tid = setTimeout ("movet ()", NS );
}
Movet (1 );
</SCRIPT>
</Body>
</Html>
In this case, pay attention to the relationship between the Row Height and the nheight during actual use !!!