14,959
edits
No edit summary |
|||
| Line 4: | Line 4: | ||
{{chrome}} javascript console | {{chrome}} javascript console | ||
# 選單: 工具 -> 開發人員工具 -> Console | # 選單: 工具 -> 開發人員工具 -> Console | ||
# 輸入 {{kbd | key = <nowiki> $x("//img") </nowiki>}},按 Enter。就會顯示符合 xpath 規則的結果<ref>[http://stackoverflow.com/questions/3030487/is-there-a-way-to-get-the-xpath-in-google-chrome Is there a way to get the xpath in google chrome? - Stack Overflow]</ref>: | # 確認符合 XPath 規則的結果,例如 XPath 規則是 {{kbd | key = <nowiki>"//img"</nowiki>}},可在 Console 輸入 {{kbd | key = <nowiki> $x("//img") </nowiki>}},按 Enter。就會顯示符合 xpath 規則的結果<ref>[http://stackoverflow.com/questions/3030487/is-there-a-way-to-get-the-xpath-in-google-chrome Is there a way to get the xpath in google chrome? - Stack Overflow]</ref>: | ||
https://farm4.staticflickr.com/3886/15103179455_c452b70923.jpg | https://farm4.staticflickr.com/3886/15103179455_c452b70923.jpg | ||