JS计时器

//定义计时器
        setInterval('GetDB()'1000);
        //获取代办任务
        function GetDB() {
            $.ajax({
                type: "Get",
                dataType: "json",
                asyncfalse,
                url: '/Ajax/Common/Attachment.ashx',
                data: 'HandlerType=getdb&rand=' + newCommon.atrand(10000000),
                success: function (data) {
                    //document.getElementById('TodoItemCount').innerHTML(data);
                    $("#TodoItemCount").html(data);
                }
            });
        }
原文地址:https://www.cnblogs.com/zecVip/p/4514898.html