js--window.postMessage

父页面想子页面发送消息:

var iframe=document.getElementById(‘centerFormIframe_iframe‘).contentWindow;
iframe.postMessage(‘full‘,‘*‘);

  

子页面向父页面发送消息:

window.parent.postMessage(‘full‘,‘*‘);

  

监听:

window.addEventListener(‘message‘,function(e){
  if(e.data==‘exit‘){}
})

  

js--window.postMessage

上一篇:window下载并且安装kafka


下一篇:No executable found matching command "dotnet-aspnet-codegenerator"