日期:2013-10-01  浏览次数:21123 次

<html>
<head>
<style>
    #div{}{width:300px;height:200px;color=red;border-top:1px solid #000;border-bottom:1px solid #000;border-left:1px solid #000;border-right:1px solid #000;size=13px;position:absolute;bottom:50px;right=80px;}
   
</style>
</head>

<body>
    <script language="javascript">
        var moveable = false;
        function aa(val)
        {                       
             var obj = document.getElementById("div");
            if(val == 0)
            {
                obj.style.display="";
                        var x,y;
           
                x = event.clientX;
                y = event.clientY;
          
                obj.style.left=x;
                obj.style.top=y;
                        //alert("X:"+x+"Y:"+y);
            }
                    else
              obj.style.display="none";
        }   
        function startgrap(obj)
        {                       
            if(event.button==1)
            {
            obj.setCapture();
             //记录鼠标和层位置;
                       x0 = event.clientX;
                       y0 = event.clientY;
                       x1 = parseInt(obj.style.left);
                       y1 = parseInt(obj.style.top);
                       moveable = true;