Jquery 获取 iframe 父页面与子页面的元素和方法jquery
1.在页面中查找 iframe 页面元素:
$("#iframe").contents().find("#id")
2.在 iframe 中查找父页面元素:
$("#id", parent.document)
3.在 iframe 中调用父页面中定义的方法和变量:
parent.meth...
1.在页面中查找 iframe 页面元素:
$("#iframe").contents().find("#id")
2.在 iframe 中查找父页面元素:
$("#id", parent.document)
3.在 iframe 中调用父页面中定义的方法和变量:
parent.method
parent.value
最新评论
热门推荐
我要评论