在Chrome DevTools中搜索HTML元素 [英] Searching for HTML elements in Chrome DevTools

查看:224
本文介绍了在Chrome DevTools中搜索HTML元素的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在此网站上,有一个div,其属性为class="item".当我单击 F12 调出开发人员工具时.我按 Ctrl + F 并输入class="item",没有结果返回.我还尝试了 Ctrl + Shift + F ,但未返回任何内容.这是屏幕截图:

On this website, there's a div with the attribute class="item". When I clicked F12 to bring up the Developer Tools. I pressed Ctrl + F and typed in class="item" and no results came back. I also tried Ctrl + Shift + F but nothing returned. Here is a screenshot:

即使我搜索class=,也只能找到HTML注释中的文本. 提前感谢您能够提供的任何帮助.

Even if I search for class=, only text within HTML comments are found. Thanks in advance for any help you are able to provide.

推荐答案

我搜索了元素的XPath,它起作用了:

I searched for the XPath of the element instead and it worked:

//*[@class="item"]

这篇关于在Chrome DevTools中搜索HTML元素的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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