100分在线等 ,子窗口点提交自动关闭的时候,父窗口刷新。 100分在线等 ,子窗口点提交自动关闭的时候,父窗口刷新。各位大侠,小弟三叩首拜上。我之前自己到网上看了一些例子 都不行。 你们能够给出2个页面的例子程序吗?最好能够运行出来的。 如果是给的是一些片段程序的话 就不要了。我自己都找了好多,加上去了运行不出来。谢谢了 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 如果是用模态窗口的话,关闭的时候有个returnValue的,通过判断这个来刷新试试。以前用过,好像都不用了 是在父窗口来刷新的,记得父窗口 var returnValue = showModelDi.....();下一句 就刷新自己的本窗口不就行了 1.html<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title></title><script> function myOpen(){ var retVal = window.showModalDialog("2.html",null,"center:yes;scroll:0;status:0;help:0;location:0;dialogWidth:350px;dialogHeight:100px;help:no;status:no"); if(retVal!=null){ window.location.reload(); } } function test(){ alert("测试"); }</script></head><body onload="test();">主页面<br/><br/><br/><br/><a href="#" onclick="myOpen();">打开子窗口</a></body></html>2.html<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title></title><script>function myClose(){ window.returnValue = "这是子窗口"; window.close();}</script></head><body>子窗口<a href="#" onclick="myClose();">确认</a></body></html> applet问题--解决问题立即给分,急 急!HQL查询问题 struts+hibernate!! 求助JSP页面之间中文参数 Servlet调用Servlet? 性能优化(关于preppareStatement)(在线等) 汉化了JIRA(BUG系统),有需要的朋友联系我 提一个关于struts和struts layout的概念问题。 新做一个简单实例. jsp+servlet+ejb(session+entity) . 适合新手 !!!!!! 请自行下载1 JBUILDER中,生成了一个EJB,该怎么运行? IE8与其它IE浏览器的问题,求解。 两个表怎么同时插入数据
是在父窗口来刷新的,记得父窗口 var returnValue = showModelDi.....();下一句 就刷新自己的本窗口不就行了
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<script>
function myOpen(){
var retVal = window.showModalDialog("2.html",null,"center:yes;scroll:0;status:0;help:0;location:0;dialogWidth:350px;dialogHeight:100px;help:no;status:no");
if(retVal!=null){
window.location.reload();
}
}
function test(){
alert("测试");
}
</script>
</head>
<body onload="test();">
主页面<br/><br/><br/><br/>
<a href="#" onclick="myOpen();">打开子窗口</a>
</body>
</html>
2.html<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<script>
function myClose(){
window.returnValue = "这是子窗口";
window.close();
}
</script>
</head>
<body>
子窗口
<a href="#" onclick="myClose();">确认</a>
</body>
</html>