使用JQuery与iframe交互

在iframe中查找父页面元素的方法:

$('#id', window.parent.document)

 

在父页面中获取iframe中的元素方法:

$(this).contents().find("#suggestBox")

 

在iframe中调用父页面中定义的方法和变量:

parent.method

parent.value

posted @ 2009-12-22 22:16  ido  阅读(1687)  评论(0编辑  收藏  举报