Referencing Images with JavaScript in HTML4

by "Martin Clifford" <MLC1(at)nrc.gov>

 Date:  Wed, 15 May 2002 10:06:53 -0400
 To:  <hwg-basics(at)hwg.org>
  todo: View Thread, Original
Hi all :o)

Just out of curiosity, since the NAME attribute for an IMG has apparently =
been depricated in HTML4, what is the proper way to reference and =
manipulate images with JavaScript?

Obviously, it used to be document.imageName.src =3D 'images/mrHappy.gif'; =
etc...

Do we have to use ID tags now?  document.images['mrHappy'].src =3D =
'images/mrHappy.gif';?

Thanks in advance!

Martin

HTML Guild: hwg-basics mailing list archives, maintained by Web Professionals @ IWA