Js倒计时10秒系统自动提交

$(document).ready(function () {
    RunTimer = function (k) {
        $("#tit_time").text("请您确定提交,倒计时: " + k + "秒后将自动提交");
        k--;
        if (k >= 0) {
            timer = setTimeout(function () {
                RunTimer(k)
            }, 1000);
        }
        else {
            vm.confirm();//十秒后系统自动提交
        }

    };
});
RunTimer(10);//调用倒计时
发布了99 篇原创文章 · 获赞 60 · 访问量 30万+

猜你喜欢

转载自blog.csdn.net/lengyuewusheng99/article/details/73480261
今日推荐