JSFiddle - React, Tailwind, and code Playground
by stevea
HTML
<div id="outerdiv">
This is the outer div.
<div id="innerdiv">
This is the inner div.
</div>
</div>
<div id ="html_display"></div>
<button id="gethtml">Get HTML</button>
CSS
div#outerdiv {
border:2px solid black;
width:200px;
}
div#innerdiv {
border: 1px solid red;
width:200px;
}
div#html_display {
width:200px;
height:500px;
border:1px solid green;
position:absolute;
top:0px;
left:350px;
}
button#gethtml {
position:absolute;
top:0px;
left:220px;
}
JavaScript
$('#gethtml').click(function(){
var outerhtml = $('#outerdiv').html();
$('#html_display').text(outerhtml id=);
debugger;
x=1;
});