Easy Tutorial
❮ Prop Style Paddingbottom Prop Node Ownerdocument ❯

complete Attribute


Definition and Usage

The complete attribute returns whether the browser has finished loading the image.

It returns true if the loading is complete, otherwise it returns false.

Syntax


Browser Support

All major browsers support the complete attribute.


Example

The following example checks if the image has finished loading:

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>tutorialpro.org(tutorialpro.org)</title>
<script>
function alertComplete(){
    alert("Image loaded: " + document.getElementById("compman").complete);
}
</script>
</head>

<body onload="alertComplete()">
<img decoding="async" loading="lazy" id="compman" src="compman.gif" alt="Computerman" width="107" height="98">

</body>
</html>

❮ Prop Style Paddingbottom Prop Node Ownerdocument ❯