Horje

How to Using onload on an <input type="image"> element. Alert "Image is loaded" immediately after an image has been loaded - HTML onload Attribute

Input Example.
index.html
Example: HTML
<!DOCTYPE html>
<html>
<body>

<input type="image" onload="loadImage()"  src="https://horje.com/uploads/category/2024-08-31-06-56-41-php_script.png" alt="Submit" width="48" height="48">

<script>
function loadImage() {
  alert("Image is loaded");
}
</script>

</body>
</html>

Output should be:

How to Using onload on an <input type="image"> element. Alert "Image is loaded" immediately after an image has been loaded - HTML onload Attribute




Type:
html
Category:
Web Tutorial
Sub Category:
HTML Attribute
Uploaded by:
Admin