[JQuery]JQuery取得IFrame中的值
- 开发笔记
- 2008-10-14
- 46热度
- 0评论
[code]
1.在父窗口中操作 選中IFRAME中的所有單選鈕
$(window.frames["iframe1"].document).find("input[@type='radio']").attr("checked","true");
2.在IFRAME中操作 選中父窗口中的所有單選鈕
$(window.parent.document).find("input[@type='radio']").attr("checked","true");
iframe框架的:
[/code]
[code]
$('#parentElem', top.document).append('

');
[/code]
[code]
alert($(document.getElementById('ifr').contentWindow.document.body).html());
[/code]