【问题标题】:View full page source after javascript has run ('view generated source') in Chrome?在 Chrome 中运行 javascript 后查看完整页面源代码(“查看生成的源代码”)?
【发布时间】:2020-01-09 05:15:26
【问题描述】:

我们可以在right clicking on that element and clicking 'inspect element'right clicking on that element and clicking 'inspect element' 为单个元素运行 后看到源代码。

Firefox 让我们通过view source -> view generated source 查看整页源。

我们如何在 chrome 中做到这一点?也就是在 chrome 中运行了 javascript 之后,我们如何才能看到 full 页面源代码?

【问题讨论】:

  • Chrome 中没有这样的功能。作为一种解决方法,您可以在元素检查器中右键单击 <html> 节点,然后单击“编辑为 HTML”。
  • 谢谢@wOxxOm,它非常有效,应该作为答案发布。您也可以选择 并按 F2,也可以将整个内容复制并粘贴到外部编辑器中以更轻松地查看。

标签: google-chrome selenium-chromedriver google-chrome-devtools


【解决方案1】:

这不能在 Chrome 中以本机方式完成,但 View Rendered Source extension 可以做到这一点,并将渲染的源代码与原始源代码进行比较。您也可以通过右键访问扩展。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2013-12-03
    • 2011-08-23
    • 2014-04-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多