views:

34

answers:

1

Is there a way to make an html page from the contents() object??

for example iterate over $('body').contents() object and make a output like this:

<body>
<div>text<a href=#></a></div>
<p>%^$$</p>
....
</body>

thanks!!! and sorry for the english!

+1  A: 

Have a look at jQuery append().

http://api.jquery.com/append/

TJB