我的天空

sasa

导航

層的推拉

<!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>
    層的推拉
</title>

<script language=javascript>
var min;
var mout;
function moveout(){
clearTimeout(min);
if(a.style.pixelLeft<0){
a.style.pixelLeft+=2;
mout=setTimeout("moveout()",20);}
}
function movein(){
clearTimeout(mout);
if(a.style.pixelLeft>-120){
a.style.pixelLeft-=2;
min=setTimeout("movein()",20);}
}
</script>
</head>
<body  text-align: center;">
    <form name="form1" method="post" action="Default.aspx" onsubmit="javascript:return WebForm_OnSubmit();" id="form1">

        
<div id="a" style="background-color:red;height:250px;width:150px;position:absolute;top:200px;left:0px" onmouseover="moveout()" onmouseout="movein

()">dddd</div>

        </form>
</body>
</html>

posted on 2008-02-25 15:53  By xin  阅读(151)  评论(0)    收藏  举报