Re: Span or Div
> Date: Wed May 31, 2006 12:00 am (PDT)Use the element's tagName property:
> From: "kmcoleoz" ken.m.cole@...
> Subject: Span or Div
> If I have the id of an element and therefore can get to it
> by "getElementById()", once I have it, how can I tell if it is a span
> or a div? In my case I know it will be one or the other?
alert( document.getElementById('someElement').tagName );
This message has not been scanned for viruses.
Since I do not use a Microsoft operating
system or software, and use only plaintext
for email, there is little need for me to do so.