📜  js如何等到所有元素加载 - Javascript代码示例

📅  最后修改于: 2022-03-11 15:02:57.358000             🧑  作者: Mango

代码示例1
var checkExist = setInterval(function() {
   if ($('#the-canvas').length) {
      console.log("Exists!");
      clearInterval(checkExist);
   }
}, 100); // check every 100ms