javascript - How to get the entire document HTML as a string? -


Is a string to get the whole HTML inside a html tag in JS?

  document.documentElement. ?? MS has  external HTML  and  internal HTML  

/ Code> properties some time ago According to

, external HTML is supported in Firefox 11, Chrome 0.2, Internet Explorer 4.0, Opera 7, Safari 1.3, Android, Firefox Mobile 11. , IE Mobile, Opera Mobile, and Safari Mobile. The external HTML is in the specification.

See browser compatibility for all your support innerHTML .

  var markup = document.documentElement.innerHTML; Warning (markup);  

Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -