Jump to content

get id from element


blob84

Recommended Posts

First stop, are you sure you're gointing at the right document? The "document" object points to the current (HTML) document, not an external XML document.Second, if this is XML, you'll have to get the attribute with the getAttribute() method, like:

getElementsByTagName('message')[0].getAttribute("id")

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...