您的位置:首頁(yè)源碼下載JavaScript代碼

jQuery XPath下載(實(shí)現(xiàn)跨frame文檔查詢)

授權(quán)形式: 免費(fèi)版
更新時(shí)間: 2013-05-05 12:09:26
軟件語(yǔ)言: 多國(guó)語(yǔ)言
軟件平臺(tái): Windows,Linux
軟件類別: 程序源碼
文件大。 未知
評(píng)論等級(jí): ★★★☆☆
下載次數(shù): 0(今日:,本周:,本月:

軟件簡(jiǎn)介

jQuery XPath 0.2.5 發(fā)布,該版本支持跨幀(frame)的文檔查詢。jQuery XPath 是一個(gè) jQuery 插件,實(shí)現(xiàn)了全功能的 XPath 2.0 查詢語(yǔ)言。

jQuery XPath 是一個(gè) jQuery 插件,實(shí)現(xiàn)了全功能的 XPath 2.0 查詢語(yǔ)言。

示例代碼:

$(document).xpath("*"); // Returns {Element} html (direct child of context item - document)
$(document).xpath("//head << //body"); // Returns {Boolean} true (head is preceding body)
$(document).xpath("//*[parent::html][last()]") // Returns {Element} body (last child of html)
$(document.body).xpath("count(ancestor::node())"); // Returns {Number} 2 (2 ancestor nodes)
$(document.body).xpath("preceding-sibling::element()"); // Returns {Element} head (prev sibling)
$(document.documentElement).xpath("body | head"); // Returns {Element} head and body (ordered)
$(document.documentElement).xpath("body, head"); // Returns {Element} body and head (not ordered)

贊助商鏈接: