前端解决跨域问题的N种方法之postMessage

平时会不会有一个需求是 我在打开不同域网站的时候 要把我的某个变量数据传递过去 方法有很多很多种 今天介绍下postMessage H5 postMessage 语法 otherWindow.postMessage(message, targetOrigin); otherWindow 其他窗口的一个引用,比如iframe的contentWindow属性、执行window.open返回的窗口对象、
相关文章
相关标签/搜索