node.complete
<img src="./img/001.jpg" id="box">
var img=document.getElementById("box")
var timer=setInterval(function(){
if(img.complete){
clearInterval(timer);
alert("加载完毕>>>") } },1000)
<img src="./img/001.jpg" id="box">
var img=document.getElementById("box")
var timer=setInterval(function(){
if(img.complete){
clearInterval(timer);
alert("加载完毕>>>") } },1000)
本文标题:JavaScript 判断图片加载完毕
本文链接:https://www.haomeiwen.com/subject/bborcltx.html
网友评论