Get the html of the javascript-rendered page (after interacting with it)

前端 未结 4 375
感情败类
感情败类 2021-01-30 14:16

I would like to be able to save the state of the html page after I\'ve interacted with it.

Say I click a checkbox, or the javascript set the values of various elements.<

4条回答
  •  借酒劲吻你
    2021-01-30 14:23

    That should do and will grab the ALL page not just the body

    console.log(document.getElementsByTagName('html')[0].innerHTML);
    

提交回复
热议问题