代码示例:(标识:jsck_document_applets_2)
<!DOCTYPE html>
<html>
<body>

<h1>Document 对象</h1>

<h2>applets 属性</h2>

<p>本文档中的 applet 数量为:</p>

<p id="demo"></p>

<script>
let num = document.applets.length;
document.getElementById("demo").innerHTML = num;
</script>

</body>
</html>
运行结果: