HTML DOM Document applets 属性

定义和用法

不推荐使用 applet 属性。请不要使用它。

applet 属性在所有新浏览器中返回空的 HTMLCollection。

HTML5 不支持 <applet> 元素。

备选方案:

获取文档中 <applet> 元素的数量:

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

亲自试一试

另请参阅:

HTML <applet> tag

HTML <object> tag

HTML DOM Object Object

实例

文档中 <applet> 元素的数量:

let num = document.applets.length;

亲自试一试

语法

document.applets

Return value

Type Description
Object HTMLCollection object containing all <applet> elements in the document.