iframe传参调用子页面方法报错

contentWindow.xxx is not a function、iframe的时候还没有加载完成导致报错

var frame = document.getElementById("map");

 frame.onload = function(){

  frame.contentWindow.getMobile()

};

https://blog.csdn.net/weixin_42596278/article/details/90606924

posted @ 2019-11-30 11:34  汪兴  阅读(629)  评论(0编辑  收藏  举报