I have an HTML document with the following code
<html>
<head></head>
<body>
<div id="wrapper">
<div class="label">First Name : </div>
<div class="value">John Doe</div>
</div>
</body>
</html>
Using javascript I want to access the contents of div#wrapper as a string like
var s = '<div class="label">First Name : </div><div class="value">John Doe</div>';
tried
var wrapperContent = document.getElementBydId("wrapper").innerHTML; // returns First Name : John Doe
but this gives me only the text values. Anyways I can achieve this ??