What is the preferred way to get a reference to an element in a document?

Giganews Newsgroups
Subject: What is the preferred way to get a reference to an element in a document?
Posted by:  jrosing…@hotmail.com (Rosinger)
Date: 31 Jul 2003

Hi all,

What is the preferred in term of browser copatability to get a
reference to an element in the document in JavaScript?

I am not sure about when to use document.all or document.layers or
document.getElementByID. Are they all doing the same thing?

Cheers,

dave

Replies