Image.complete : img « HTML Tags « JavaScript Tutorial






The complete property is a Boolean value that specifies if an image has finished loading.

After an image has completely loaded, the property is changed to false.

If the load is aborted or an error occurs during the loading process, the property will be set to true.

<html>
    <head>
    <title>Example of complete Property</title>
    </head>
    <img name="circle" src="http://www.java2s.com/style/logo.png">
    <br>
    <script language="JavaScript">
    <!--
    if(document.circle.complete == true)
      document.write("The image has finished loading.");
    else
      document.write("The image has not finished loading.");
    -->
    </script>
    </html>








21.9.img
21.9.1.Image
21.9.2.Image.border
21.9.3.Image.complete
21.9.4.Image.height
21.9.5.Image.hspace
21.9.6.Image.lowsrc
21.9.7.Image.name
21.9.8.Image.src
21.9.9.Image.vspace
21.9.10.Image.width
21.9.11.Change link image in mouse in and mouse out
21.9.12.Change image align
21.9.13.Change image title
21.9.14.Image substitute
21.9.15.Image load onerror event (IE)
21.9.16.Add onerror handler to image element within document element array (IE)
21.9.17.Replace an Image under mouse event (onMouseOver, onMouseOut)
21.9.18.Slide Show
21.9.19.Change vspace for image