欧美日韩一区二区三区四区不卡,日韩欧美视频一区二区三区四区,久久精品欧美一区二区三区不卡,国产精品久久久乱弄

咨詢電話:186 7916 6165 咨詢電話:186 7916 6165 (微信同號)    在線QQ:181796286
NEWS BLOG ·
學無止境
關注開優網絡 關注前沿
JS打造實用的隨屏滾動DIV層
如何在手機瀏覽器網頁中點擊鏈接跳轉到QQ聊天界面

“您是第幾位訪客”的來訪統計js

發表日期:2017-02-04    文章編輯:南昌開優網絡    瀏覽次數:4953    標簽:JS應用

這些都是虛擬的,是當頁面刷新一次統計的數字就增加一次。
<script language="JavaScript">
    <!--
    var caution = false
    function setCookie(name, value, expires, path, domain, secure) {
    var curCookie = name + "=" + escape(value) +
    ((expires) ? "; expires=" + expires.toGMTString() : "") +
    ((path) ? "; path=" + path : "") +
    ((domain) ? "; domain=" + domain : "") +
    ((secure) ? "; secure" : "")
    if (!caution || (name + "=" + escape(value)).length <= 4000)
    document.cookie = curCookie
    else
    if (confirm("Cookie exceeds 4KB and will be cut!"))
    document.cookie = curCookie
    }
    function getCookie(name) {
    var prefix = name + "="
    var cookieStartIndex = document.cookie.indexOf(prefix)
    if (cookieStartIndex == -1)
    return null
    var cookieEndIndex = document.cookie.indexOf(";", cookieStartIndex + prefix.length)
    if (cookieEndIndex == -1)
    cookieEndIndex = document.cookie.length
    return (document.cookie.substring(cookieStartIndex + prefix.length, cookieEndIndex))
    }
    function deleteCookie(name, path, domain) {
    if (getCookie(name)) {
    document.cookie = name + "=" +
    ((path) ? "; path=" + path : "") +
    ((domain) ? "; domain=" + domain : "") +
    "; expires=Thu, 01-Jan-70 00:00:01 GMT"
    }
    }
    function fixDate(date) {
    var base = new Date(0)
    var skew = base.getTime()
    if (skew > 0)
    date.setTime(date.getTime() - skew)
    }
    var now = new Date()
    fixDate(now)
    now.setTime(now.getTime() + 365 * 24 * 60 * 60 * 1000)
    var visits = getCookie("counter")
    if (!visits)
    visits = 1
    else
    visits = parseInt(visits) + 1
    setCookie("counter", visits, now)
    document.write("<span style='color:#165AAD'>您是第</span>" + visits + "<span style='color:#165AAD'>個來到本站訪客!</span>")
    // -->
    </script>
主站蜘蛛池模板: 深水埗区| 永福县| 寿光市| 喀喇| 岐山县| 崇信县| 清流县| 和政县| 西畴县| 阳谷县| 谷城县| 平邑县| 广饶县| 丰台区| 应用必备| 灵山县| 鱼台县| 兴义市| 泰安市| 赞皇县| 嘉祥县| 兰考县| 中西区| 商洛市| 九江市| 南华县| 和平区| 湄潭县| 铜川市| 涿州市| 绍兴市| 盐城市| 虎林市| 乌兰察布市| 洛扎县| 辰溪县| 乐平市| 抚顺市| 周至县| 莒南县| 山丹县|