在 Chrome DevTools 中搜索 HTML 元素 [英] Searching for HTML elements in Chrome DevTools
本文介绍了在 Chrome DevTools 中搜索 HTML 元素的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在这个网站上,有一个带有 class="item"
属性的 div
.当我单击 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屋!
查看全文