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

猜你喜欢

转载自www.cnblogs.com/wang-xing/p/11961838.html
今日推荐