两种获得iframe内元素的方法

jquery获取
$("#atrDialogIframe_protocoliframe").contents().find('span').text()

JS原生获取
document.getElementById("atrDialogIframe_protocoliframe").contentWindow.document.getElementById("span")

iframe调用上级窗口的JS

  window.parent.上级方法;

相关文章:

  • 2022-12-23
  • 2021-06-16
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-07-18
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案