使用postMessage发送跨域消息,
window.postMessage('hello there!', location.protocol + '//a.b.com');
但是报了下面的错误:
Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('http://a.b.com') does not match the recipient window's origin ('http://c.e.com')
请问是什么原因?
森栏
相关分类