@CharlesJun 10.2005 — #You can address any given P element with somethng like [font=monospace]document.getElementsByTagName ('P')[0][/font]. But getting the X,Y coordinates is something else.
@CharlesJun 10.2005 — #You may use the index of that specific <p> tag in the [b]document.getElementsByTagName('p')[/b] collection as well. It depends on what you want to do.[/QUOTE]Do note, however, that in HTML it is [b]document.getElementsByTagName('P')[/b] but in XHTML it is [b]document.getElementsByTagName('p')[/b].
@KorJun 10.2005 — #document.getElementsByTagName('p') works perfectly in HTML as well (<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">)
@CharlesJun 10.2005 — #In HTML all element names are uppercase, it's just that HTML is case insensitive. JavaScript, however, is case sensitive. Just because a few browsers add a little normalizing to the method doesn't mean that all of them do. Besides, we might as well be syntactically correct.