iframe 跨域问题 我有一个页面A,在页面A中有一个iframe,iframe的src是诸如百度,新浪的网站链接,现在我想在iframe里面的url变化时,在页面A的显示(有个地方显示iframe地址)也同时变化,请问如何实现? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 我试着将远程页面源文件保存成本地文件,然后再载入,结果用php写文件时却提示没有权限,不知道怎么回事 <iframe src="www.baidu.com"></iframe> 这我当然知道问题是当iframe里面的url变了,我要获取到最新的url 不知道楼主是不是要的这种效果。<html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><title>自定义title - 5iuu.com</title></head><body><input type="radio" name="ra" id="1"/>新浪<br/><input type="radio" name="ra" id="2" />腾讯<br/><input type="radio" name="ra" id="3"/>网易<br/><input type="button" value="选择" onclick="ReturnValue()"/><input type="text" id="txt" width="100px" value="http://www.baidu.com"/>//用于显示url网址<iframe id="fram" src="http://www.baidu.com" style="width:600px;float:left;height:500px"></iframe><script>function ReturnValue() { var name=""; if(document.getElementById("1").checked) name="http://www.sina.com"; if(document.getElementById("2").checked) name="http://www.qq.com"; if(document.getElementById("3").checked) name="http://www.126.com";document.getElementById("fram").src=name;document.getElementById("txt").value=name;}</script></body></html> 我的意思是iframe里面的页面手动用鼠标去点击跳转页面,如何获取新的页面的url 加载了人家的页面,新的页面不一定会在iframe里吧,会自动打开新窗口的 window.parent.frames['frame_name'].document.getElementById("id").value = "地址"(或者innerHTML = "地址")试一试 恩,如果是新页面就不管他了,如果是自身页面跳转,如何获取呢,另外我成功的把网页内容写到我服务器上,然后载入到iframe中,但是有些网页显示不出来to:10楼,你那个语句怎么用呢,放在哪 frames中的任何页面,不知道灵不灵 alert(window.frames['frameName'].window.location); 写个每个100毫秒获取IFRAME中的SRC的值。如与上次不同则执行你要的方法! 如何在IE8的选项卡之间进行焦点切换 不知道是那里的问题 js中求工作日 在javascript中怎样得到日期属于哪一周!!!!!! js 日期转换 JS读取服务器上文件内容~高分 (求助)指定位置打开页面的困惑问题 以下代码,要实现点击a,b,c单选框时,D显示=a*20%+b*20%+c*60%,并保留两位小数 无边窗口能不能调用远程javascript文件? Actives控件不提时下载? 新人,谁帮我写个循环好吗? 淘宝购物时选择地区的效果如何实现?
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>自定义title - 5iuu.com</title>
</head>
<body>
<input type="radio" name="ra" id="1"/>新浪<br/>
<input type="radio" name="ra" id="2" />腾讯<br/>
<input type="radio" name="ra" id="3"/>网易<br/>
<input type="button" value="选择" onclick="ReturnValue()"/>
<input type="text" id="txt" width="100px" value="http://www.baidu.com"/>//用于显示url网址
<iframe id="fram" src="http://www.baidu.com" style="width:600px;float:left;height:500px"></iframe>
<script>
function ReturnValue()
{
var name=""; if(document.getElementById("1").checked)
name="http://www.sina.com";
if(document.getElementById("2").checked)
name="http://www.qq.com";
if(document.getElementById("3").checked)
name="http://www.126.com";
document.getElementById("fram").src=name;
document.getElementById("txt").value=name;}
</script>
</body>
</html>
to:10楼,你那个语句怎么用呢,放在哪