前端开发获取短信验证码

手机游戏开发前端
unity 开发游戏前端吗
web前端可以开发游戏吗

代码片段 1

<!DOCTYPE html>
    <head>
        <meta charset=”utf-8″ />
        <title>获取短信验证码–感谢谢俊</title>
        <style>
            a {
                background: none repeat scroll 0 0 #f4f4f4;
                border: 1px solid #dddddd;
                color: #333;
                display: inline-block;
                height: 36px;
                line-height: 36px;
                margin-left: 10px;
                margin-top: 0;
                padding: 0;
                text-align: center;
                text-decoration: none;
                padding: 0 10px;
            }
        </style>
    </head>
    <body>
        <a href=”javascript:void(0);” id=”view”>获取短信验证码</a>
        <script>
            var t,
                timer,
                view = document.getElementById(‘view’),
                bState = true
            function gain() {
                t = 3
                clearInterval(timer)
                timer = setInterval(function() {
                    bState = false
                    view.innerHTML = ‘<b>’ + t + ‘</b>秒后重新获取’
                    if (t == 0) {
                        view.innerHTML = ‘获取短信验证码’
                        clearInterval(timer)
                        bState = true
                    }
                    t–
                }, 1000)
            }
            view.onclick = function() {
                bState && gain()
            }
        </script>
    </body>
</html>
小游戏前端开发
前端和游戏开发
web前端小游戏开发
» 本文来自:前端开发者 » 《前端开发获取短信验证码》
» 本文链接地址:https://www.rokub.com/7585.html
» 您也可以订阅本站:https://www.rokub.com
赞(0)
64K

评论 抢沙发

评论前必须登录!