JavaScript: The Definitive Guide

Previous Chapter 21
JavaScript Reference
Next Property

Name Property---the name of an image


Navigator 3.0



name is a read-only string property of the Image object. Its value is specified by the NAME attribute of the HTML <IMG> tag that creates the Image object. Image objects created with the Image() constructor function do not have names, and cannot have names assigned.


Images created in an HTML document with the <IMG> tag are listed in the document.images[] array in JavaScript. If an image is given a name, then the image is also stored in a property with that name in the document object. For example, an image with the attribute:

could be referred to as:


See Also


Previous Home Next
Image.lowsrc Book Index Image.onabort()

HTML: The Definitive Guide CGI Programming JavaScript: The Definitive Guide Programming Perl WebMaster in a Nutshell
Hosted by uCoz