iframe中发送数据


parent.postMessage(data, "*”);

父窗口接收数据

      window.addEventListener("message", function(event) {
          console.log("Hello from " + event.data);
      });