简体   繁体   中英

Firefox doesn't run setInterval function (the latest Firefox)

I have simple code:

$(document).ready(function(){
    setInterval(function(){
        alert('Hello!');
    },3000);
});

This code working on Chrome, but doesn't work on Firefox oO I using Firefox 28.0 and don't have any tips in FireBug (console is empty).

Try to use load

$(document).load(function(){
    setInterval(function(){
        alert('Hello!');
    },3000);
});

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM