Re: [問題] jQuery選取元素內容部份

看板Ajax作者 (骨頭)時間17年前 (2008/06/18 21:37), 編輯推噓0(001)
留言1則, 1人參與, 最新討論串3/3 (看更多)
※ 引述《TonyQ (骨頭)》之銘言: : ※ 引述《j87b0003 (Surf Time-暑Y團)》之銘言: : 我猜猜 : $(jq("#reduce_button") , $("#frame")[0].document.body) ? : $(選擇器字串,選擇器要過濾的對象) 果然猜錯了=.=a 我做的實驗 (失敗就是size() = 0 ) $("input" ,$($("#frame")[0].document) ) -> 失敗 $("input" ,$("#frame")[0].document) -> 失敗 $("input" ,$("#frame")) -> 失敗 $($("#frame")[0].document.getElementById("reduce_button")) ->成功 不過太dirty了 =.= $($("#frame")[0].document).find("input") -> 失敗 ──────────────────────────────── $("#frame").contents().find("#reduce_button") -> GET it ──────────────────────────────── 有關contents的相關資料 http://docs.jquery.com/Traversing contents( ) Returns: jQuery Find all the child nodes inside the matched elements (including text nodes), or the content document, if the element is an iframe. --  ▄▅▆▇███▇▆▅▄▃        ╰┼╯─╮ ╮         ◥███████████◣       ╰┼╯=│=│         ◥██████───────    *. ╯  ╯ ╯ の 物 語 .*  ◥███████──────◣ ~ ◢◣             ◢◣  ◥██████───────◤   ◥◤  空白的世界.翼 ◥◤  ◥██▁▂▃▄▅▆▇███▆▅▄▃▂▂telnet://tony1223.no-ip.info -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 220.134.27.68

06/18 21:57, , 1F
好髒 XDD
06/18 21:57, 1F
文章代碼(AID): #18MG-qfk (Ajax)
文章代碼(AID): #18MG-qfk (Ajax)