Name
NAME — NN 3 IE 4 HTML n/a
Synopsis
NAME=”elementIdentifier"
Optional
If you are scripting an image (especially swapping precached images),
it is usually more convenient to create a reference to the
IMG
element by using a unique name you assign to
the item. Thus, if you edit the page and move or delete multiple
IMG
elements on the page, you do not have to worry
about adjusting index values to array-style references
(document.images[i]
).
Example
<IMG NAME="mugshot" SRC="janem.jpg" HEIGHT=90 WIDTH=80>
Value
Case-sensitive identifier.
Default
None.
Object Model Reference
- NN
[window.]document.images[i].name
[window.]document.imageName.name
- IE
[window.]document.images[i].name
[window.]document.imageName.name
Get Dynamic HTML: The Definitive Reference now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.