作者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