zoukankan      html  css  js  c++  java
  • setInterval的使用和停用

                var res = self.setInterval(function(){
                             if(typeof(UE.getEditor('editor').body.innerHTML) != "undefined"){
                                UE.getEditor('editor').setContent(data.body);
                                clearInterval(res);
                                console.log("填充完毕,停止setInterval循环");
                            }
                            console.log("500ms执行一次,本次已结束了");
                        },500);

    var res = self.setInterval(function(){       //console.log("开始填充body到UE.getEditor('editor').body.innerHTML");       //console.log("typeof(UE.getEditor('editor').body.innerHTML)是否已存在:"+typeof(UE.getEditor('editor').body.innerHTML));console.log(new Date().getTime());if(typeof(UE.getEditor('editor').body.innerHTML) != "undefined"){UE.getEditor('editor').setContent(data.body);clearInterval(res);console.log("填充完毕,停止setInterval循环");}console.log("500ms执行一次,本次已结束了");},500);

  • 相关阅读:
    记坑
    常用模板
    ACM-东北赛划水记
    jzoj 4178游戏
    JZOI 4163
    jzoj 4146踩气球
    jzoj 5589. 缩点
    jzoj 5588 %%%
    jzoj 5571 ffs
    BJOI 2017 Kakuro
  • 原文地址:https://www.cnblogs.com/ShanHeDiao/p/5160307.html
Copyright © 2011-2022 走看看