Is it possible in html/javascript to return the html code of a page?
I have an html page, and i would like to, by a click on a input[type=button], open the source code of the page.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
That should work fine in Firefox and Chrome. It won’t work in Internet Explorer though. Another option is to use the
outerHTMLproperty:And that should work fine in most browsers. To get that open in a new window, you could do something like this: