怎么让子窗口关闭的时候在父窗口弹出刷新的次数 在子窗口加个beforeunload事件 调用父窗口对应的函数试试 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 第一个页面<!doctype html><html><head><meta charset="utf-8"><title>父窗口</title><script type="text/javascript">var a=0;function fun(thisurl) { window.open(thisurl,"弹出页面","width=470,height=150,scrollbars=yes,resizable=no");}/*计算页面刷新次数*/function ss(){ alert('已刷新'+(++a)+"次") }</script></head> <body><input type="button" value="打开" onClick="fun('Untitled-2.html')" /></body></html>第二个页面<!doctype html><html><head><meta charset="utf-8"><title>子窗口</title><script type="text/javascript">function closeWin() { window.close(); window.opener.ss();}/*刷新父窗口页面*/</script></head> <body><h3><a href="#" onClick="closeWin()">关闭窗口</a></h3></body></html> 那就把当前的数值存到cookie里 页面加载前先取下cookie的值试试 点击flash热区跳转页面 求教,如何在JavaScript中使用EL表达式。谢谢! ext window close关闭后无法打开 求助,引用对像错误. firefox里判断一个图片无法加载? 提交数据而不跳转,求JS 【超难】怎样判断是否有showModalDialog对话框开着,并关闭它 有关htc的问题100分求救! 怎样在这行代码运行中取消弹出的窗口,或运行一句费话,小弟JAVA不熟, 有关梅花雨控件应用的问题?急用,谢谢 checkbox一个很奇怪的现象 站长工具那种功能怎么实现呢?
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>父窗口</title>
<script type="text/javascript">
var a=0;
function fun(thisurl) {
window.open(thisurl,"弹出页面","width=470,height=150,scrollbars=yes,resizable=no");
}
/*计算页面刷新次数*/
function ss(){
alert('已刷新'+(++a)+"次")
}</script>
</head>
<body>
<input type="button" value="打开" onClick="fun('Untitled-2.html')" />
</body>
</html>
第二个页面
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>子窗口</title>
<script type="text/javascript">
function closeWin() {
window.close();
window.opener.ss();
}
/*刷新父窗口页面*/
</script>
</head>
<body>
<h3><a href="#" onClick="closeWin()">关闭窗口</a></h3>
</body>
</html>