为什么这个HTML不停止加载?

huangapple go评论77阅读模式
英文:

Why wouldn't this html stop loading?

问题

当我将这行代码添加到我的HTML文件中时,我注意到页面无法停止加载。为什么?如何修复?

<input type="image" onload="this.src='done.bmp'" src="Loading.bmp">

Loading.bmp
Done.bmp

英文:

I noticed when I added this line to my html file, the page won't stop loading. Why? And how do I fix this?

&lt;input type=&quot;image&quot; onload=&quot;this.src=&#39;done.bmp&#39;&quot; src=&quot;Loading.bmp&quot; &gt;

Loading.bmp
Done.bmp

答案1

得分: 1

也许你应该使用

window.stop();

https://developer.mozilla.org/en-US/docs/Web/API/Window/stop

英文:

Maybe you should use

window.stop();

https://developer.mozilla.org/en-US/docs/Web/API/Window/stop

huangapple
  • 本文由 发表于 2023年6月22日 10:38:49
  • 转载请务必保留本文链接:https://go.coder-hub.com/76528277.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定