document.applets : applets « Document « JavaScript Tutorial






Syntax

document.applets
    document.applets[index]

The applets property is an array that contains all the Applet objects from using the tag.

The applet property has one property, called length, which contains the number of Applet objects in the array.

The index number ranges from zero to length - 1.

<html>
    <applet name="Home" code="a.class" width=50 height=50 mayscript></aPPLET>
    <applet name="Office" code="b.class" width=50 height=50 mayscript></aPPLET>

    A<br>

    <script language="JavaScript">
    <!--

    document.write(document.applets[0].name,"<br>");
    document.write(document.applets[1].name);
    --></script>

    </html>








14.5.applets
14.5.1.document.applets
14.5.2.document.applets.length
14.5.3.Checking for Java Applets with the length Property of the Applet Array