1
With pure Javascript, just grab the outerHTML element. For example, for that span:
var span = document.querySelector('#play1_3_2');
var html = span.outerHTML;
console.log(html);
<span id="play1_3_2"></span>
1
2
With pure Javascript, just grab the outerHTML element. For example, for that span:
var span = document.querySelector('#play1_3_2');
var html = span.outerHTML;
console.log(html);
<span id="play1_3_2"></span>
Browser other questions tagged javascript jquery html
You are not signed in. Login or sign up in order to post.
What would be the
outerHTML?– gato
The
outerHTMLis theinnerHTML+ the tag itself (including attributes).– bfavaretto