zoukankan      html  css  js  c++  java
  • cookie-在关闭浏览器之前弹框只弹一次

    <!DOCTYPE html>
    <html>
    <head>
    <meta charset="UTF-8">
    <title></title>
    </head>
    <body onload="">
    <script>
    function openwin(){
    alert(123)
    }
    function get_cookie(Name) {
    var search = Name + "="
    var returnvalue = "";
    console.log(document.cookie)
    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;
    returnvalue=unescape(document.cookie.substring(offset, end))
    }
    }
    return returnvalue;
    }
    function loadpopup(){ //*控制弹出窗口的函数哟,
    if (get_cookie('popped')==''){
    openwin()
    document.cookie="popped=yes"
    }
    }
    loadpopup()
    </script>
    </body>
    </html>

  • 相关阅读:
    express4.x socket
    validator
    服务管理,Dll查看
    复制程序,获取系统信息
    TCP HelloWord
    UDP HelloWord
    [置顶] 一个小马
    注册表编辑
    服务的启动与停止
    自下载运行
  • 原文地址:https://www.cnblogs.com/seven077/p/9406308.html
Copyright © 2011-2022 走看看