首页 > Web开发 > 详细

html 定时执行

时间:2017-10-09 19:14:41      阅读:311      评论:0      收藏:0      [点我收藏+]

 

 

 

    <script>
        $(function () {

            //默认是发货追溯(供应商)页面
            document.getElementById(‘ViewBackSupp‘).click();

            //判断登录是否过期
            setInterval(GetIsHaveOverTime, 5000);
        });


        function GetIsHaveOverTime() {
            
           
            $.ajax({
                type: "post",
                dataType: "json",
                url: ‘/Home/GetIsHaveOverTime‘, //回发到的页面   
                
                success: function (data) {
                    //0 未过期  1 已过期 ,过期则返回登录界面
                     
                    if (data.result == 1) { 

                        window.location.href = ‘/Login/Index‘;
                    }
                    
                }
            })

            
        }

    </script>

  

html 定时执行

原文:http://www.cnblogs.com/lhlong/p/7642328.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!