作者TonyQ (骨头)
看板Ajax
标题Re: [问题] jQuery选取元素内容部份
时间Wed Jun 18 14:20:19 2008
※ 引述《j87b0003 (Surf Time-暑Y团)》之铭言:
: 我是用iframe去做变更内容
: 注:主页为index,包含一页框名称为 frame,
: 想取得里面reduce_button元素
: 用javascript写法如下:
: var doc_frame=document.frames("frame");
: doc_frame.document.getElementById("reduce_button").value;
: 上述是OK的
: 请问各位大大转成jQuery要如何写?
: 我是试过 $("#frame").children("reduce_button").val();
: 不过抓不到...
: 感谢各位大大指教
我猜猜
$(jq("
#reduce_button") , $("#frame")[0].document.body) ?
$(选择器字串,选择器要过滤的对象)
--
应该有别的更好的作法,这是直觉想到的第一种,
不过前提是iframe内容同domain,可以存取iframe的body。
--
I am a person, and I am always thinking .
Thinking in love , Thinking in life ,
Thinking in why , Thinking in worth.
I can't believe any of what ,
I am just thinking then thinking ,
but worst of all , most of mine is thinking not actioning...
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 220.134.27.68