document.applets.length

JavaScript 1.1+, JScript 3.0+ Nav3+, IE 4+ Syntax

document.applets.length

Description

The length property contains the number of Applet objects that are in a document.

Example

Listing 7.56 uses the length property to display the number of applets in a HTML document.

Listing 7.56 Accessing the Number of Applets in a Document with the length Property
 <html> <h2>The Applets Page</h2> <applet name="myAddApplet" code="add.class" width=50 height=50 mayscript></applet> <applet name="mySubtractApplet" code="subtract.class" width=50 height=50 mayscript></applet> <script language="JavaScript"> <!-- Hide //Tell the user how many applets are currently available. document.write("There are currently ",document.applets.length); ...

Get Pure JavaScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.