iframe 跨域怎么解决,望大神们指教。

例如:


 <iframe src="http://blog.sina.com.cn/" width="100%" height="100%" frameborder="0" scrolling="no" id="Administration_frame" ></iframe>

<iframe src="http://www.xxx.com/" width="100%" height="100%" frameborder="0" scrolling="no" id="Administration_frame" ></iframe>







<iframe src="http://blog.sina.com.cn/" width="100%" height="100%" frameborder="0" scrolling="no" id="Administration_frame" ></iframe>

<iframe src="http://www.xxx.com/" width="100%" height="100%" frameborder="0" scrolling="no" id="Administration_frame" ></iframe>

http://blog.sina.com.cn/ 为例子 报以下错误

Uncaught DOMException: Blocked a frame with origin "http://localhost:24134" from accessing a cross-origin frame.
at setIframeHeight (http://localhost:24134/Administration.html:22:30)
at HTMLIFrameElement.onload (http://localhost:24134/Administration.html:37:159)

图片说明

跨域这东西,需要服务端去配合的,你传值到服务端,服务端认可你才可以,不然的话, 那把请求抓下来,想怎么登陆就登陆 了。

前端无法解决,iframe不能操作父页,父页也能操作iframe。。除非是你的域名参考这个:javascript通过iframe加载同源代理页面实现顶级域跨域操作