jQuery is not picking up correct values from a Div Tag
- by Adi Mathur
I want to pick up the values in a Div tag like which is some what like this
<html>
<head> </head>
<body>
<div id="page">
<html>
<head></head>
<body> Hellow World </body>
</html>
</div>
</body>
</html>
I want to select the content inside a div tag .
var msg = $("#page").html();
alert(msg);
this code is not working . i want that whole 2nd page along with the HTML tag is copied. How do i do that ?
I want the output to be the WHOLE thing INCLUDING the HTML tags