[Chapter 21] Reference: Document.applets[]
Author: David Flanagan
Date: Fri Aug 29 11:14:58 1997

#

| Chapter 21 JavaScript Reference |

# Document.applets[] Property

## Name

Document.applets[] Property---the applets in a document

## Availability

Navigator 3.0

## Synopsis

    document.applets
    document.applets.length

## Description

The `applets[]` property of the Document object is an array of JavaObject objects, one for each applet that appears in the document. Each JavaObject in the array refers to the Java object for an applet. You can use the JavaObject to read and write all public variables in the applet, and can invoke all of the applet's public methods.

If an `<APPLET>` tag has a `NAME` attribute, then the applet may also be referred to by using the name as a property of `document` or as an index into the `applets` array. Thus, if the first applet in a document has `NAME="animator"`, then you can refer to it in any of these three ways:

    document.applets[0]
    document.animator
    document.applets["animator"]

## See Also

"JavaObject", Chapter 19, LiveConnect: JavaScript and Java

Document.anchors[] |  | Document.bgColor