You are here: Reference > JavaScript > client-side > HTML DOM > properties > declare (applet, object)

declare property (applet, object)

Browser support:
Sets or retrieves whether an object is only a declaration (it isn't downloaded until it's needed).
There isn't any functionality implemented for this property.

Syntax:

object.declare;
You can find the related objects in the Supported by objects section below.
This property is read/write.
HTML page for this property: DECLARE

Possible values:

Boolean that indicates whether the object is only a declaration.
One of the following values:
false
Object is not only a declaration.
true
Object is only a declaration.
Default: this property has no default value.

Example HTML code 1:

This example illustrates the use of the declare attribute:
<object data="bg.jpg" width="66px" height="64px" type="image/jpeg" declare="declare">
</object>
<object type="application/x-java-applet" code="ImageViewer.class" width="200px" height="50px">
    <param name="background" value="#bgimage" valuetype="object" />
</object>
Did you find this example helpful? yes no

Example HTML code 2:

This example illustrates the use of the declare property:
<head>
    <script type="text/javascript">
        function GetDeclare () {
            var object = document.getElementById ("bgimage");
            alert (object.declare);
        }
    </script>
</head>
<body>
    <object id="bgimage" data="bg.jpg" width="66px" height="64px" type="image/jpeg" declare="declare">
    </object>

    <button onclick="GetDeclare ();">Get declare property!</button>
</body>
Did you find this example helpful? yes no

Supported by objects:

External links:

User Contributed Comments

Post Content

Post Content