在父窗口中关闭子窗口的问题 把var去掉试试.onclick="childWin=window.open('process.htm','','width=250,height=40')">要不就写个函数,childWin必须是全局变量。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 哦,还有你的doevent.php和打开窗口的不是同一个页面吗?它们的关系如何? <SCRIPT LANGUAGE="JavaScript"><!--childWin=window.open('process.htm','','width=250,height=40')">childWin.close();//--></SCRIPT> doevent.php和打开的窗口不是一个页面请问,去掉var也报一样的错啊 因为页面提交跳转,childWin句柄在新页中不再有效,建议你用隐藏帧的方式,提交后将原页面藏起来,使窗口句柄继续有效。参考<frameset name=myfrmset cols="*,1005"><frame name=hide src=target.htm><frame name=show src=submit.htm></frameset>target.htm//将这个换为你的php页<input type=button onclick=top.show.childWin.close()>submit.htm<script>var childWin;function myopen(){childWin=window.open('process.htm','','width=250,height=40,status=yes');top.myfrmset.cols="100%,*";}</script><form action="target.htm" target=hide><input type="submit" value="提交" name="submit" onclick="myopen()"><input type=button onclick=childWin.close()></form> liuliu26(小雨):这样的话是没错,但达不到我的要求,我需要将这两个动作分开做,谁知道怎么办。我对javascript中的全局变量如何定义感到模糊 怎样在Chrome谷歌浏览器上实现程序自动安装? 我想保留i的最终值,并且能在a()外部使用,大家有什么好办法没? 请教js如何操作oracle数据库 求一个正则 当我选中一个radio,出现一个文本,当我选中另一个radio时有出现另外一个文本,怎么实现,谢谢 为什么在有的机器上显示找不到对象? 如何获取不同框架表单内的值 框架的问题? 问个问题 关于 函数递归的~~~~ 怎么做出这效果 如何实现在表单提交到信息处理完毕这个过程中给出处理信息的提示? 如何通过点击一个页面按钮,关闭另一个页面?
它们的关系如何?
<!--
childWin=window.open('process.htm','','width=250,height=40')">
childWin.close();
//-->
</SCRIPT>
<frameset name=myfrmset cols="*,1005">
<frame name=hide src=target.htm>
<frame name=show src=submit.htm>
</frameset>target.htm//将这个换为你的php页
<input type=button onclick=top.show.childWin.close()>submit.htm
<script>
var childWin;
function myopen()
{
childWin=window.open('process.htm','','width=250,height=40,status=yes');
top.myfrmset.cols="100%,*";
}
</script>
<form action="target.htm" target=hide>
<input type="submit" value="提交" name="submit" onclick="myopen()">
<input type=button onclick=childWin.close()>
</form>
这样的话是没错,但达不到我的要求,我需要将这两个动作分开做,谁知道怎么办。
我对javascript中的全局变量如何定义感到模糊