简单记录一下 postMessage , 证明我来过, 我搞过 (frame 框架), 以后还能有个解决方法好去度娘:
1, 发送消息
postMessage('test', 'http://localhost');
2, 接收消息
- Windows.addEventListener('message', function (event) {
- console.log(event)
- }, false);
来源: http://www.bubuko.com/infodetail-3167643.html