faqts : Computers : Programming : Languages : JavaScript : Document

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

6 of 9 people (67%) answered Yes
Recently 6 of 9 people (67%) answered Yes

Entry

Does NN have a property similar to IE's document.all?

Jan 28th, 2003 01:51
Klaus Bolwin, Premkumar AC,


document.all is no valid DOM syntax.
In browsers like MSIE 5+ and all Gecko-based browsers (e.g. Mozilla,
Netscape 6+, Beonex, Phoenix, K-Meleon, ...) you can get access to certain
HTML-elements by their ID:
document.getElementById(elementID)
to get access to all HTML-elements of e.g. type <div>:
elref = document.getElementsByTagName("div")
elref[i].property = ...
to get access to all HTML-elements in a HTML-document:
elref = document.getElementsByTagName("*")
in this case, elref[i] is corresponding to document.all[i]