JQuery与iframe交互实现代码
2026-01-17 14:48:04 作者:用户投稿
在iframe中查找父页面元素的方法:
$('#id', window.parent.document)
在父页面中获取iframe中的元素方法:
$(this).contents().find("#suggestBox")
在iframe中调用父页面中定义的方法和变量:
parent.method
parent.value
$('#id', window.parent.document)
在父页面中获取iframe中的元素方法:
$(this).contents().find("#suggestBox")
在iframe中调用父页面中定义的方法和变量:
parent.method
parent.value
联络方式:
4008905355
邮箱:9196886@qq.com
Q Q:9196886
微信二维码
