iframe刷新问题 在提交处理完了以后<script>parent.iframe2.document.loaction=URL;</script> 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 main.htm===========================================<iframe id=iframe1 src="1.htm" width="200" height="100"><br><iframe id=iframe2 src="2.htm" width="200" height="100">1.htm===========================================<html> <body> <p id=ptxt></p> </body></html>2.htm===========================================<html><head><script language="javascript"> function toiframe() { var pstr = document.mainform.inputtext.value; parent.frames("iframe1").ptxt.innerText=pstr; //alert(pstr); }</script></head> <body> <form name="mainform"> <input type="text" value="test string" name="inputtext"> <input type="button" value="click me" onclick="toiframe()"> </form> </body></html> 问题我以解决 关键是刷新 而不是取值 我iframe里的页面是jsp。数据从数据库中取出显示解决方法如下在iframe1的页面中 点击提交后的代码加入<script>parent.iframe2.location.reload();</script>多谢大家 请教如何实现用户超时锁屏 javascript读写文件 这个由中间向四周发散透明渐变的效果,如何用JS实现? 关于一个漂浮层的效果 JS读取XML的单个数据。 关于Button和Div的从属性问题,也许不可能解决! 禁止粘贴复制功能问题 如何做文章内容分页? 当点击select控件,鼠标指针停在select控件的某一个option选项时,触发的什么事件? ie 和 netscape中关于关闭窗口时打开新窗口的问题 在线等。。。。如何创建一个input实例 如何在html文件中用javascript语句包含文件
===========================================
<iframe id=iframe1 src="1.htm" width="200" height="100"><br>
<iframe id=iframe2 src="2.htm" width="200" height="100">1.htm
===========================================
<html>
<body>
<p id=ptxt></p>
</body>
</html>
2.htm
===========================================
<html>
<head>
<script language="javascript">
function toiframe()
{
var pstr = document.mainform.inputtext.value;
parent.frames("iframe1").ptxt.innerText=pstr;
//alert(pstr);
}
</script>
</head>
<body>
<form name="mainform">
<input type="text" value="test string" name="inputtext">
<input type="button" value="click me" onclick="toiframe()">
</form>
</body>
</html>
我iframe里的页面是jsp。数据从数据库中取出显示
解决方法如下
在iframe1的页面中 点击提交后的代码加入
<script>
parent.iframe2.location.reload();
</script>
多谢大家