How to get full htmlcode of page

I want to get full HTML of a page how can I do it??

get the body using /html/body and then use item.innerHTML