📜  javascript 就绪状态 - 任何代码示例

📅  最后修改于: 2022-03-11 14:58:43.776000             🧑  作者: Mango

代码示例1
(function() {
    var state = document.readyState;
    if(state === 'interactive' || state === 'complete') {
        // do stuff
    }
    else setTimeout(arguments.callee, 100);
})();