jQuery中$(function())的作用


当前第2页 返回上一页

微信截图_20200403180415.png

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

$(function(){//五分钟无操作,返回系统首页,timeToreturn.js

    function timeToReturn(){

        window.location.href = "http://localhost:8080/zhongCourt/";

    }

    var nowtime = Date.parse(new Date());

    var timeend = Date.parse(new Date());

  

    $("body").click(function(){

        nowtime = Date.parse(new Date());

        console.log("nowtime" + nowtime);  

    });

  

    function check(){

        timeend = Date.parse(new Date());

        console.log("check");

        if((timeend - nowtime) > 300000){

            timeToReturn();

        }

        setTimeout(check,10000);

    }

    setTimeout(check,10000);

     

})

本文来自 js教程 栏目,欢迎学习!

以上就是jQuery中$(function())的作用的详细内容,更多文章请关注木庄网络博客

返回前面的内容

相关阅读 >>

jQuery怎么输出html代码

jQuery和javascript的区别有哪些

jQuery如何获取class的值

jQuery如何解除事件绑定?

jQuery怎么样判断元素是否隐藏起来

jQuery判断是否存在滚动条的方法

jQuery不兼容ie浏览器怎么办

jQuery判断是否包含指定字符串

jQuery怎么判断滚动条是否存在

判断一个对象是否为jQuery对象的方法是什么

更多相关阅读请进入《jQuery》频道 >>




打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...