<SCRIPT LANGUAGE="JavaScript">
window.onload=function loadpopup()
{
if(window.name==null||window.name!="opened")
openwin();
}
function openwin(){
window.open('a.html','','menubar=no,toolbar=no,top=0,left=0,location=no,resizable=yes,height='+(window.screen.availHeight-30)+',width='+(window.screen.availWidth-10));
window.name="opened";
}
</SCRIPT>

解决方案 »

  1.   

    <SCRIPT LANGUAGE="JavaScript">
    window.onload=function loadpopup()
    {
        if(window.name==null||name.closed)
        openwin();
    }
    function openwin(){
        var name=window.open('a.html','','menubar=no,toolbar=no,top=0,left=0,location=no,resizable=yes,height='+(window.screen.availHeight-30)+',width='+(window.screen.availWidth-10));
        
    }
    </SCRIPT>
      

  2.   

    <html>
    <head>
    <title>只显示一次弹出式窗口</title>
     
    </head>
    <body>
    只打开一次广告窗口!
    <script language="javascript">
    <!--
    popshow = "";
    popshow = readCookie("popshow");
    if (popshow == "") {
    open("adv.htm","","width=700,height=250");
    }
    writeCookie("popshow","yes",30); function readCookie(name){
    cookieValue = "";
    search = name + "=";
    if(document.cookie.length > 0){ 
    offset = document.cookie.indexOf(search);
    if (offset != -1){ 
    offset += search.length;
    end = document.cookie.indexOf(";", offset);
    if (end == -1) end = document.cookie.length;
    cookieValue = unescape(document.cookie.substring(offset, end))
    }
    }
    return cookieValue;
    }
    function writeCookie(name, value, day){
    expire = "";
    expire = new Date((new Date()).getTime() + day * 86400000);
    expire = "; expires=" + expire.toGMTString();
    document.cookie = name + "=" + escape(value) + expire;
    }
    //-->
    </script>
    </body>
    </html>