作者TonyQ (骨頭)
看板Ajax
標題Re: [問題] jQuery選取元素內容部份
時間Wed Jun 18 21:37:54 2008
※ 引述《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
1F:→ gpmm:好髒 XDD 06/18 21:57