2022-10-01 11:53:21
68阅读
<!DOCTYPE HTML>
<html>
<head>
<img id="img">
<div id="time"></div>
</head>
<body>
<script type="text/javascript">
let num = 0
const imageObj = new Image();
const timer = setInterval(() => {
document.getElementById('time').innerHTML = num++
imageObj.onload = () => {
document.getElementById('img').src = imageObj.src
console.log(num)
clearInterval(timer);
}
},1000)
imageObj.src = 'http://good1230.com/templates/test_img/1.jpg';
</script>
</body>
</html>
最后生成于
2024-06-22 12:07:22
热门推荐:
此内容有帮助 ?
0