是“页面源”之前或之后的JavaScript已被渲染? [英] Is "Page Source" BEFORE or AFTER JavaScript has been rendered?

查看:108
本文介绍了是“页面源”之前或之后的JavaScript已被渲染?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Firefox中有一个显示Page Source的菜单项:View |页面源(Ctrl + U)。
在Internet Explorer中有一个类似的函数。

当你调用它的时候,它会显示一个格式良好和语法高亮的HTML(和JavaScript)代码集合。



我不知道这个HTML(可在页面源代码中查看)是否是JavaScript预处理结果 (导致修改原始的原始HTML),或者仅仅是HTTP GET所接收的 raw

>查看源代码是在应用任何JavaScript之前的代码。 Firefox的Web Dev工具栏将允许您从View Source> View Generated Source菜单选项查看得到的后JavaScript源代码。

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 displays a nicely formatted and syntax-highlighted collection of HTML (and JavaScript) code.

What I don't know is whether this HTML (viewable in the Page Source) is the result of pre-processing of the JavaScript (resulting in modification of the original raw HTML) or just raw as received by HTTP GET.

解决方案

The "View Source" code is the code before any JavaScript is applied.

Firefox's Web Dev toolbar will allow you to view the resulting post-JavaScript source code from the View Source > View Generated Source menu option.

这篇关于是“页面源”之前或之后的JavaScript已被渲染?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆