如何获取Firebug中的元素的绝对XPath? [英] How to get the absolute XPath for an element within Firebug?
问题描述
我曾经在Firebug中看到一个元素的绝对XPath。例如。像这样:
html / body / div [2] / table / tbody / tr / td
code>
当我使用Firebug在表格中选择某个元素时,将鼠标悬停在 HTML panel我再也看不到XPath了。
如何让Firebug以工具提示或其他方式再次显示XPath?
HTML 面板是在Firebug 2.0中删除,因为重复 要求说这些工具提示相当烦人而不是有用的。
如果您需要元素的XPath,可以右键单击它并从上下文菜单中选择 Copy XPath 以将元素的绝对XPath复制到
对于带有 id
属性的元素,Firebug 2.0中还有一个新选项用于复制一个简短的XPath称为复制最小XPath 。
I used to see the absolute XPath for an element within Firebug. E.g. something like this:
html/body/div[2]/table/tbody/tr/td
When I select a certain element in a table using Firebug, then hover around the highlighted code inside the HTML panel I can't see the XPath anymore.
How to get Firebug to display the XPath again as a tooltip or any other way?
The tooltips for elements within the HTML panel were removed in Firebug 2.0, because there were repeated requests saying these tooltips were rather annoying than helpful.
If you need the XPath of an element, you can right-click it and choose Copy XPath from the context menu to copy the absolute XPath of the element to the clipboard.
For elements with and id
attribute there's also a new option in Firebug 2.0 to copy a short XPath called Copy Minimal XPath.
这篇关于如何获取Firebug中的元素的绝对XPath?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!