Is there simple any way to get an element's starting tag in javascript as string? Suppose I have a DOM node which is a html element in a variable, I would like write something similar:
var tagName = element.tagName; //Works
var startingTag = element.startingTag; // Is there any way?
var startingTag = getStartingTag(element); // Or do I have to write my own function?
Thx for answers
For example this is a starting tag I would like to get into a string:
<Table class="anyClass" width="100" ... >
where the tagName only gives this: "Table"