DOM 树
?UIWebView
可以做到这么神奇?DOM tree
in an iOS app? UIWebView
can do
such a magic?页面的源代码和页面的 DOM 的概念相似,但又不同.源是未经任何客户端脚本掺杂的原始 HTML.它是 HTTP 请求对服务器的直接响应.另一方面,DOM 是相同的 HTML 结构,已被 JavaScript 修改.
The notions between a page's source and a page's DOM are similar, but different. The source is the raw HTML that is unadulterated by any client-side scripts. It is the direct response of the HTTP request to the server. The DOM, on the other hand, is the same HTML structure that has been modified by JavaScript.
源代码读取页面的 HTML 就像您在文本编辑器中打开它一样.源代码会在加载任何 JavaScript 之前反映您的 HTML 结构.虽然无法编辑内容,但查看浏览器从服务器接收的 HTML 很有用.
Source Code reads the page's HTML as if you opened it in a text editor. The source code reflects your HTML structure before any JavaScript is loaded. While the contents can’t be edited, it’s useful to see the HTML the browser receives from the server.
https://developer.apple.com/library/mac/documentation/AppleApplications/Conceptual/Safari_Developer_Guide/ResourcesandtheDOM/ResourcesandtheDOM.html
尝试阅读有关 API,我认为有用于翻译和东西的 API
Try to read about API, I think there are API's for translate and stuff
这篇关于源代码和 DOM 有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!