HTML5:使用postMessage实现Ajax跨域请求

因为同源策略的限制,Javascript存在跨域通讯的问题,典型的跨域问题有iframe与父级的通讯等。 常规的几种解决方法: (1) document.domain+iframe; (2) 动态建立script; (3) iframe+location.hash; (4) flash。 这里不细说这几种方法,记录的是HTML5的window.postMessage。postMessage兼容IE
相关文章
相关标签/搜索