Is “Page Source” BEFORE or AFTER JavaScript has been rendered?

前端 未结 4 1185
逝去的感伤
逝去的感伤 2020-12-18 20:26

In Firefox there is a menu item that displays \"Page Source\": View | Page Source (Ctrl+U). In Internet Explorer there is a similar function.

When you invoke it, it

4条回答
  •  轮回少年
    2020-12-18 21:25

    Unfortunately, it will always display the HTML as the page was before DOM-change by javascript, etc. So the answer is: what you are seeing is "raw as received by HTTP GET".

    You can use a tool like Firebug (Firefox & Chrome) to see live dom changes. Or you can make your own function to display the live dom.

提交回复
热议问题