Uncaught DOMException: Blocked a frame with origin 使用postMessage()方法可以解决跨域传值的问题 Api: https://developer.mozilla.org/zh-CN/docs/Web/API/Window/postMessage 父页面: layer.open({ skin: 'rocket', scrollbar: false, type: 2, title: 'test', shadeClose: true, area: ['50%', '50%'], content: url,//iframe的url btn:['保存'], btnAlign: 'c', yes: function(index, layero){ window[layero.find('iframe')[0]['name']].postMessage('addAndEdit', '*'); layer.close(index); }, cancel: function(index, layero){ window[layero.find('iframe')[0]['name']].postMessage('addAndEdit', '*'); layer.close(index); } }); function