Re: [問題] jQuery選取元素內容部份
※ 引述《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
06/18 21:57, 1F
討論串 (同標題文章)
本文引述了以下文章的的內容:
完整討論串 (本文為第 3 之 3 篇):
Ajax 近期熱門文章
PTT數位生活區 即時熱門文章