[英]What html tags support the onload/onerror javascript event attributes?
[英]What html tags support the onload javascript event?
我知道img
body
和iframe
允許你將onload=
添加到標簽並且必須執行。 還有哪些標簽支持onload
操作? 您知道所有標簽的列表以及支持的操作嗎?
html4的規范只提到了body
和frameset
: http : //www.w3.org/TR/html4/interact/scripts.html#h-18.2.3
我認為這取決於瀏覽器。
你也可以在<script>
標簽上使用它,除了你需要onreadystatechange
以獲得相同效果的IE。
我認為它也適用於某些瀏覽器中的<object>
元素(但只是少數)。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.