SyntaxFix
Write A Post
Hire A Developer
Questions
In jQuery:
var html_string = $('html').outerHTML()
In plain Javascript:
var html_string = document.documentElement.outerHTML