码迷,mamicode.com
首页 > Web开发 > 详细

iframe显示跨域url页面

时间:2014-10-17 20:24:49      阅读:305      评论:0      收藏:0      [点我收藏+]

标签:style   blog   http   color   sp   文件   div   on   问题   

可以通过JS搞定跨域问题,但是比较麻烦,我就在后台处理了,其实这样本质上也算不上是跨域了

后台otherwebsite.php:

<?php
$url="www.otherwebsite.com";
echo "
<html>
<head>
    <title></title>
    <meta content=‘0; url={$url}‘ http-equiv=‘refresh‘>
</head>
</body>
</html>
"?>

然后把这个php文件的地址放到iframe标签里的src里就可以了:<iframe src="otherwebsite.php"></iframe>

iframe显示跨域url页面

标签:style   blog   http   color   sp   文件   div   on   问题   

原文地址:http://www.cnblogs.com/ymy124/p/4031845.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!