HTML DOM Document applets 屬性

定義和用法

不推薦使用 applet 屬性。請不要使用它。

applet 屬性在所有新瀏覽器中返回空的 HTMLCollection。

HTML5 不支持 <applet> 元素。

備選方案:

獲取文檔中 <applet> 元素的數量:

let num = document.getElementsByTagName("applet").length;

親自試一試

另請參閱:

HTML <applet> 標簽

HTML <object> 標簽

HTML DOM Object 對象

實例

文檔中 <applet> 元素的數量:

let num = document.applets.length;

親自試一試

語法

document.applets

返回值

類型 描述
對象 包含文檔中所有 <applet> 元素的 HTMLCollection 對象。