如何让子窗口关闭的时候在父窗口弹出刷新的次数
怎么让子窗口关闭的时候在父窗口弹出刷新的次数我的需求是想在子窗口关闭之后那个计算刷新次数的alert()才
怎么让子窗口关闭的时候在父窗口弹出刷新的次数
我的需求是想在子窗口关闭之后 那个计算刷新次数的alert()才弹出来 而不是一打开子窗口就出来
[解决办法]第一个页面
<!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>