iframe刷新子页面 如何刷新iframe子页面呢?例如:A.html里有iframe name="frm" src="B.html",如果我在A页面里点击一个按钮让B页面刷新该怎么做呢? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 试试 window.frames['frameName'].reload(); 我测试的代码如下:请帮忙检查下<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312" /><title>无标题文档</title><script language="JavaScript"> function open_window() {window.frames['test1'].reload();} </script> </head><body><button id="we" name="we" onclick="open_window()">dianji</button><iframe src="http://www.baidu.com" id="test1" width="400" height="400" name="test1"></iframe></body></html> <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312" /><title>无标题文档</title><script language="JavaScript"> function open_window() {window.frames['test1'].location = "http://www.baidu.com";} </script> </head><body><button id="we" name="we" onclick="open_window()">dianji</button><iframe src="http://www.csdn.net" id="test1" width="400" height="400" name="test1"></iframe></body></html> 一套整体的手机应用小游戏开发的详细步骤 一个类的原始为何是一个“对象”呢?即为何prototype属性是一个对象? 同位置显示不同图片,如何用js实现? 正则表达式匹配问题 在一个页面中,通过js如何根据用户的选择,来呈现要编写的模板? innerHTML一个js,怎样才能加载它? location的问题 请教:如何在JAVASCRIPT中调用VBSCRIPT的函数? 怎样清空type="file"入面的内容 新手提问:能否让FileSystemObject获得本地文件操纵权限? 有人用过"Damn Small Rich Text Editor"吗? 超晕超难的问题,搞了一上午了!
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<script language="JavaScript">
function open_window() {
window.frames['test1'].reload();
}
</script>
</head>
<body>
<button id="we" name="we" onclick="open_window()">dianji</button>
<iframe src="http://www.baidu.com" id="test1" width="400" height="400" name="test1"></iframe>
</body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<script language="JavaScript">
function open_window() {
window.frames['test1'].location = "http://www.baidu.com";
}
</script>
</head>
<body>
<button id="we" name="we" onclick="open_window()">dianji</button>
<iframe src="http://www.csdn.net" id="test1" width="400" height="400" name="test1"></iframe>
</body>
</html>