好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

iframe提取与改变父页面元素_html/css_WEB-ITnose

一:利用jquery方法获得


1:取值

$(window.parent.document).find("#second_navigator").html();


2:改变父页面元素

$(window.parent.document).find("#second_navigator").html(“我是从iframe里传来的值”);


二:javaScript方法


1:取值

window.parent.document.getElementById("second_navigator").innerHTML;


2:改变父页面元素

window.parent.document.getElementById("second_navigator").innerHTML="我是从iframe里传来的值";

查看更多关于iframe提取与改变父页面元素_html/css_WEB-ITnose的详细内容...

  阅读:42次