有什么区别&QUOT的差异;来源"和"生成的源"? [英] What is the difference between "Source" and "Generated Source"?

查看:145
本文介绍了有什么区别&QUOT的差异;来源"和"生成的源"?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么是源与生成的源代码在Firefox?

What is the difference between "Source" and "Generated Source" in Firefox?

请用例子来解释。

编辑: 7月3日

哪个源搜索引擎使用,生成或之前产生?

Which source "Search engine" uses, Generated or before generated?

推荐答案

来源将显示该网页被加载(由服务器提供)。

Source will show the source that the page was loaded with (served by the server).

生成的源将借鉴来源$ C ​​$ C从目前的DOM元素,因此包含由JavaScript动态创建的元素。

Generated source will draw 'source code' from the current DOM elements, and therefore includes elements dynamically created by JavaScript.

例如,源会显示:

<script>
  window.onload = function(){
    document.getElementById('test').innerHTML = 'Generated Content';
  }
</script>
<html>
  <div id='test'>Source</div>
</html>

和生成的源当时将画源代码的话点击查看生成的源,之后div的内容已被改变,你会看到:

and Generated Source would 'draw' the source at the time you click 'View Generated Source', after which the div's contents have been changed, and you would see:

<script>
  window.onload = function(){
    document.getElementById('test').innerHTML = 'Generated Content';
  }
</script>
<html>
  <div id='test'>Generated Content</div> <!-- Note the difference here -->
</html>

这篇关于有什么区别&QUOT的差异;来源&QUOT;和&QUOT;生成的源&QUOT;?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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