<! 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>
<Meta http-equiv = "Content-Type" content = "text/html; charset = gb2312"/>
<Title> untitled document </title>
<Style type = "text/css">
<! --
* {Margin: 0px; padding: 0px}
# Abc {
Position: absolute;
Left: 155px;
Top: 5px;
Width: 200px;
Height: 370px;
Z-index: 1;
Border: 5px solid #666666;
Background-color: # CCCCCC;
Overflow: hidden;
}
-->
</Style>
</Head>
<Body>
<Div id = "abc" onclick = "opendiv ()">
Laksdflkjf <p> 3453245353 </p>
</Div>
<Script>
Document. getElementById ("abc"). style. left = "1248px ";
Document. getElementById ("abc"). style. width = "0px ";
Function closediv ()
{
Scrollpage2 = setInterval (closediv2, 5 );
}
Function closediv2 ()
{
Var l = parseInt (document. getElementById ("abc"). style. left)
Var w = parseInt (document. getElementById ("abc"). style. width)
If (l> 1245 | w <0)
{
ClearInterval (scrollpage2 );
} Else {
L = l + 3
Document. getElementById ("abc"). style. left = (l) + "px ";
W = w-2.5
Document. getElementById ("abc"). style. width = (w) + "px ";
}
}
Function opendiv ()
{
If (parseInt (document. getElementById ("abc"). style. width)> 0)
Scrollpage2 = setInterval (closediv2, 10 );
Else
Scrollpage = setInterval (opendiv2, 10 );
}
Function opendiv2 ()
{
Var l = parseInt (document. getElementById ("abc"). style. left)
Var w = parseInt (document. getElementById ("abc"). style. width)
If (l <1050 | w> 200)
{
ClearInterval (scrollpage );
} Else {
L = l-3
Document. getElementById ("abc"). style. left = (l) + "px ";
W = w + 3.5
Document. getElementById ("abc"). style. width = (w) + "px ";
}
}
</Script>
</Body>
</Html>