日期:2014-05-16  浏览次数:20407 次

请教高手:如何保存改动过后的网页,万分感谢!
以下是我在csdn找的一段可以拖动的层的代码,但是刷新之后拖动过后的层又回到了原来的位置,我想请教一下如何保存拖动过后的状态,也就是说,刷新之后,拖动过的层
不会再回到原来的位置.
   
<html>      
    <head>      
    <meta       http-equiv= "Content-Type "       content= "text/html;       charset=gb2312 ">      
    <title> </title>      
    <style>      
    .removableObj      
    {      
    height:25;      
    position:relative;      
    left:       1px;      
    }      
    </style>      
    <script       language= "javascript "       src= "prototype.js "> </script>      
    <script       language= "javascript ">      
    var       beginMoving=false;      
    var       sourceObj=null;      
    var       objectObj=null;      
    var       objectObj2=null;      
    function       MouseDownToMove(obj){      
    obj.style.zIndex=1;      
    obj.mouseDownY=event.clientY;      
    obj.mouseDownX=event.clientX;      
    beginMoving=true;      
    obj.setCapture();      
    sourceObj=obj;      
    objectObj=null;      
    }      
       
    function       MouseMoveToMove(obj){      
                    if(!beginMoving)       return       false;      
    obj.style.top       =       (event.clientY-obj.mouseDownY);      
    obj.style.left       =       (event.clientX-obj.mouseDownX);      
    }      
    function       MouseUpToMove(obj){      
    if(!beginMoving)       return       false;      
    obj.releaseCapture();      
    obj.style.top=0;      
    obj.style.left=0;      
    obj.style.zIndex=0;      
    beginMoving=false;      
    window.setTimeout( "swapFun() ",20);      
    }      
       
    function       MouseOverFun(obj)      
    {      
    if(obj==sourceObj)       return       false;