JS有关弹出窗口的特效,高手请进.......急!

我在做QQ登陆接口。当QQ登陆成功后怎么关闭登陆的子窗口并刷新原有父页面。若QQ未与网站账号绑定。则触发JS弹出绑定子窗口。绑定失败或未进行绑定时关闭了子窗口。父页面不做修改且清空QQ登陆产生的SESSION(就是重新刷新父页面时不会弹出账号绑定子窗口)。参考www.yoka.com的QQ登陆接口效果!主要是绑定账号时,如果我不绑定直接把子窗口点X了,主页面保持不变!急求!!!!!!!万分感激!!!!!

分都不给,悲剧哦
不太清楚你的意思,这里有段我写的子窗口关闭时回调父窗口函数的方法,希望对你有帮助
page1.html
<html>
<head>
<title>主页面</title>
<script type="text/javascript">
var idx = 0
function openSubWin()
{
window.open('page2.html', 'newwindow',
'height=100, width=100, top=0, left=0, toolbar=no, menubar=yes, scrollbars=yes,resizable=yes,location=no, status=no');
}
//关闭子窗口回调函数
function fun1(){
//alert("你关闭了子窗口");
document.getElementById('btn1').value = "弹出子页面 " + (++idx) + "次";
}
</script>
</head>
<body>
<input type="button" id = "btn1" value="弹出子页面" onclick = "openSubWin()" />
</body>
</html>

page2.html:
<html>
<head>
<title>子页面</title>
<script type="text/javascript">
function closeWin()
{
window.opener.fun1();
window.close();
}
</script>
</head>
<body>
子页面<br/>
<input type = "button" value = "关闭窗口" onclick = "closeWin();"/>
</body>
</html>
温馨提示:内容为网友见解,仅供参考
无其他回答
相似回答