All browsers support “View page source” feature. But what it displays is source of the page as it was originally rendered by the server. In today’s Web 2.0 world page content can change a thousand times after that. Client-side script, user input, AJAX calls can contribute to page update.
Just copy it from there and paste it to where it can be put to a good use.
Note “void” in front of function call. It prevents browser from going to a new page, displaying “null” after the prompt is closed.
This approach works both i IE and Firefox, but if you use IE, you can use “.outerHTML” property to display full page source in its entirety from <HTML> to </HTML>.