zoukankan      html  css  js  c++  java
  • 页面倒计时返回

    <!DOCTYPE>
    <html>
    
    <head>
        <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=7" />
        <title>我的秀,我操作</title>
        <style type="text/css" media="screen">
            * {
                margin: 0;
                padding: 0;
                font-family: arial, sans-serif;
                font-size: 14px;
            }
            
            body,
            html {
                height: 100%;
            }
            
            body {
                background: #e9eaef;
            }
            
            .wrapper {
                margin: 0 auto;
                /* 背景图片 */
                background: #fff url(images/bg.png) top center;
                 587px;
                height: 196px;
                padding: 80px 0 0 80px;
                top: 50%;
                margin-top: -150px;
                position: relative;
            }
            
            h3 {
                font-weight: 700;
                font-size: 16px;
            }
            
            .tm {
                padding-top: 24px;
            }
            
            .tm span {
                color: #e10602;
                padding: 0 5px;
                font-weight: 700;
            }
            
            .btn {
                padding-top: 14px;
            }
            
            .btn a {
                display: block;
                 150px;
                height: 0;
                overflow: hidden;
                padding-top: 30px;
                /* 前往百度首页按钮 */
                background: #00f url(images/go.png) 0 0;
                color: #fff;
            }
        </style>
    </head>
    
    <body>
        <div class="wrapper">
            <h3>该功能已关闭,即将跳转到百度首页。</h3>
            <p class="tm">本页<span id="time">5</span>秒内自动跳转...</p>
            <p class="btn"><a id="Btn" href="http://www.baidu.com">前往百度首页</a></p>
        </div>
        <script type="text/javascript">
            function sendStats(url) {
                var n = "log_" + (new Date()).getTime();
                var c = window[n] = new Image();
                c.onload = (c.onerror = function() {
                    window[n] = null;
                });
                c.src = 'http://www.baidu.com' + url;
                c = null;
            }
    
            var time = document.getElementById('time');
            var btn = document.getElementById('Btn');
    
            function count() {
                if (+time.innerHTML > 0) {
                    time.innerHTML = time.innerHTML - 1;
                } else {
                    sendStats('gotobaidu');
                    location.href = btn.href;
                }
            }
            setInterval(count, 1000);
    
            btn.onclick = function() {
                sendStats('gotobaidu');
            };
        </script>
    </body>
    
    </html>
    

      

    <!DOCTYPE>
    <html>

    <head>
    <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=7" />
    <title>我的秀,我操作</title>
    <style type="text/css" media="screen">
    * {
    margin: 0;
    padding: 0;
    font-family: arial, sans-serif;
    font-size: 14px;
    }
     
    body,
    html {
    height: 100%;
    }
     
    body {
    background: #e9eaef;
    }
     
    .wrapper {
    margin: 0 auto;
    /* 背景图片 */
    background: #fff url(images/bg.png) top center;
    width: 587px;
    height: 196px;
    padding: 80px 0 0 80px;
    top: 50%;
    margin-top: -150px;
    position: relative;
    }
     
    h3 {
    font-weight: 700;
    font-size: 16px;
    }
     
    .tm {
    padding-top: 24px;
    }
     
    .tm span {
    color: #e10602;
    padding: 0 5px;
    font-weight: 700;
    }
     
    .btn {
    padding-top: 14px;
    }
     
    .btn a {
    display: block;
    width: 150px;
    height: 0;
    overflow: hidden;
    padding-top: 30px;
    /* 前往百度首页按钮 */
    background: #00f url(images/go.png) 0 0;
    color: #fff;
    }
    </style>
    </head>

    <body>
    <div class="wrapper">
    <h3>该功能已关闭,即将跳转到百度首页。</h3>
    <p class="tm">本页<span id="time">5</span>秒内自动跳转...</p>
    <p class="btn"><a id="Btn" href="http://www.baidu.com">前往百度首页</a></p>
    </div>
    <script type="text/javascript">
    function sendStats(url) {
    var n = "log_" + (new Date()).getTime();
    var c = window[n] = new Image();
    c.onload = (c.onerror = function() {
    window[n] = null;
    });
    c.src = 'http://www.baidu.com' + url;
    c = null;
    }

    var time = document.getElementById('time');
    var btn = document.getElementById('Btn');

    function count() {
    if (+time.innerHTML > 0) {
    time.innerHTML = time.innerHTML - 1;
    } else {
    sendStats('gotobaidu');
    location.href = btn.href;
    }
    }
    setInterval(count, 1000);

    btn.onclick = function() {
    sendStats('gotobaidu');
    };
    </script>
    </body>

    </html>
  • 相关阅读:
    LeetCode "Palindrome Partition II"
    LeetCode "Longest Substring Without Repeating Characters"
    LeetCode "Wildcard Matching"
    LeetCode "Best Time to Buy and Sell Stock II"
    LeetCodeEPI "Best Time to Buy and Sell Stock"
    LeetCode "Substring with Concatenation of All Words"
    LeetCode "Word Break II"
    LeetCode "Word Break"
    Some thoughts..
    LeetCode "Longest Valid Parentheses"
  • 原文地址:https://www.cnblogs.com/cisum/p/7755196.html
Copyright © 2011-2022 走看看