I have a <span>
element as follows:
<span style="position: absolute; top: -42px; right: 2px; z-index: 100;" data-ng-click="DeleteImageProperties(img.vehicleId, img.vehiclePhotoId, img.fileName)">×</span>
And I am reading this <span>
like this:
var outerHTML = itemelement[0];
it returns the above output, but I want to convert it to string. If I use:
outerHTML.toString()
it just returns:
[object HTMLSpanElement]
How could I get a pure string representation of my <span>
?
It looks like you really want outerHTML.outerHTML
, as it's clearly not the outer HTML, but a DOM node in a variable with a strange name
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With