jquery取得iframe元素的方法
收集利用Jquery取得iframe中元素的几种方法 :
$(document.getElementById('iframeId').contentWindow.document.body).htm() $("#testId", document.frames("iframename").document).html(); $(window.frames["iframeName"].document).find("#testId").html() $(window.frames["iframe1"].document).find("input[@type='radio']").attr("checked","true");$(window.parent.document).find("input[@type='radio']").attr("checked","true");<iframe src="test.html" id="iframe1" width="700" height="300" frameborder="0" scrolling="auto"></iframe>