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

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

 

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

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

 

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

parent.method

parent.value

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-11-24
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-22
猜你喜欢
  • 2022-12-23
  • 2021-09-07
  • 2022-12-23
  • 2021-12-10
  • 2022-12-23
  • 2023-03-14
相关资源
相似解决方案