本帖最后由 pl02206984 于 2013-05-12 01:31:59 编辑

解决方案 »

  1.   

    <!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=utf-8" />
    <title>无标题文档</title>
    <style type="text/css">
    </style>
    <script type="text/javascript">
    function init(){
    var cookie=document.cookie;
    alert(cookie);
    var begin=cookie.indexOf("openFirst=");
    if(begin!=-1){
    var end=cookie.indexOf(";",begin);
    if(end==-1){
    end=cookie.length;
    }
    var content=cookie.substring(begin+"openFirst=".length,end);
    if(content){
    return;
    }
    }
    var div=document.createElement("idv");
    var style={
    'position':'absolute',
    'left':'200px',
    'top':'200px',
    'width':'400px',
    'height':'400px',
    'borderStyle':'solid'
    }
    for(var i in style){
    div.style[i]=style[i];
    }
    div.dir='rtl';
    var input=document.createElement("input");
    input.type='button';
    input.value='X';
    input.onclick=function(){
    document.body.removeChild(div);
    }
    div.appendChild(input);
    document.body.appendChild(div);
    document.cookie='openFirst=true;max-age=10000';
    }
    function clearCookie(){
    document.cookie="openFirst=";
    }
    window.onload=init;
    </script>
    </head><body>
    <input type="button" value="clear cooke" onclick="clearCookie()">
    </body>
    </html>
    用cookie试试
      

  2.   

    你可以在关闭那个div的时候,再执行一段js代码,
    这段js代码,解析现在浏览器地址栏的url,删除你指定显示那个div的参数,这个比较简单。然后再location.href = new_url刷新此页,就OK了貌似是这样的。
      

  3.   

    登陆的时候 在cookie中加个 标记如果有标记 则 弹出框  并 删除这个标记