我有這樣的XML文檔:中的XML元素名逃逸期間使用jQuery
<subpages>
<page.subpage>
<title>blah</title>
</page.subpage>
</subpages>
但是當我通過每個page.subpage
嘗試循環,什麼都不會返回。
$(xml).find("page.subpage").each(function() {
console.log("found something!");
}
我猜爲什麼不返回任何事做與週期?我已經嘗試過HTML轉義它與.
,但它似乎沒有工作。
可能欺騙:http://stackoverflow.com/questions/350292/how-do-i-get-jquery-to-select-elements-with-a-period-in-their-id – MikeM 2011-05-24 04:07:01