是HTML的查看源代码从HTML在检查元素有什么不同? [英] Is the HTML is View Source different from the HTML in Inspect Element?

查看:792
本文介绍了是HTML的查看源代码从HTML在检查元素有什么不同?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在使用Firefox萤火虫一起开发人员工具。

I'm using Firefox alongside Firebug Developer tools.

时的查看源代码(按Ctrl + U )从HTML我看到检查使用Firebug元素时不同所示的HTML?

Is the HTML shown in View Source (Ctrl + U) different from the HTML I see when inspecting elements using Firebug?

什么是两者之间的区别是什么?

What are the differences between the two?

推荐答案

是的,他们是不同的。

查看源代码说明你的页面的原始HTML源代码。

View source shows you the original HTML source of the page.

督察显示你的DOM,因为它是由浏览器PTED间$ P $。这包括不能在HTML源代码中可以看出由JavaScript做例子的变化。

The inspector shows you the DOM as it was interpreted by the browser. This includes for example changes made by javascript which cannot be seen in the HTML source.

呵呵,这也算为开发工具,允许你查看DOM在其他浏览器一样,Chrome网上督察和Internet Explorer开发工具栏。 HTML源将永远是在所有浏览器一样,生成的DOM可能会有所不同,因为它是一个跨pretation和渲染引擎是各不相同的(可惜)。

Oh and this also counts for the developer tools that allow you to view the DOM in other browsers, like the Chrome Web Inspector and Internet Explorer Developer Toolbar. The HTML source will always be the same across all browsers, the generated DOM might differ as it is an interpretation and render engines are not all the same (unfortunately).

这篇关于是HTML的查看源代码从HTML在检查元素有什么不同?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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