You are here: Reference > JavaScript > client-side > HTML DOM > properties > complete (img, input:image)

complete property (img, input:image)

Browser support:
Returns a Boolean value that indicates whether the loading of an element is finished or not.
The onload event can be used to receive a notification when the loading process is completed.

Syntax:

object.complete;
You can find the related objects in the Supported by objects section below.
This property is read-only.

Possible values:

Boolean that indicates the state of loading.
One of the following values:
false
The loading is not finished yet.
true
The loading is finished.
Default: false.

Example HTML code 1:

This example shows how to use complete property:
<head>
    <script type="text/javascript">
        function OnLoadImage (img) {
            var isComplete = img.complete;
            alert(isComplete);
        }
    </script>
</head>
<body>
    <img src="picture.gif" onload="OnLoadImage (this);" />
</body>
Did you find this example helpful? yes no

Supported by objects:

Related pages:

External links:

User Contributed Comments

Post Content

Post Content