获取动态加载的HTML内容(Chrome / Gmail)的代码来源 [英] Get code source of dynamically loaded HTML content (Chrome/Gmail)

查看:171
本文介绍了获取动态加载的HTML内容(Chrome / Gmail)的代码来源的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试访问AJAX动态加载内容的HTML代码源。我该怎么办?
例如,在Gmail上,我正在尝试访问给定电子邮件讨论的内容(给定电子邮件讨论的不同条目)的HTML代码,只有当我点击主列表中的电子邮件讨论的行时才会加载。我可以访问的代码源只是最初加载的页面(所有电子邮件讨论的列表)。任何想法?

I am trying to access the HTML code source of AJAX dynamically loaded content. How could I do it? For example on Gmail, I am trying to access the HTML code of a given email discussion's content (the different entries of a given email discussion) which is loaded only when I click on this email discussion's line in the main list. The code source I can access is only the one of the page initially loaded (the list of all email discussions). Any idea?

推荐答案

右键单击页面,选择检查元素。当JavaScript对页面进行更改时,元素视图将被更新,而查看源视图仅显示加载页面时的内容。

Right-click on the page and select "Inspect Element". The element view is updated when JavaScript makes changes to the page, whereas the "View Source" view only shows content from when the page was loaded.

这篇关于获取动态加载的HTML内容(Chrome / Gmail)的代码来源的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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