如何关闭窗口.打开
我知道你可以用 window.close 关闭 window.open 但还有其他方法吗?我有一个打开 facebook 连接的弹出窗口,我想在用户连接到 facebook 时关闭弹出窗口,然后刷新父窗口...我想过去我
TARGET = "_top"
在这里使用的是我的代码
$(document).ready(function(){
$('#signin_menu a').click(function (){
window.open(
$('#signin_menu a').attr("href"),
'mywindow',
'width=850,height=400'
);
return false;
});
})
也
$('#signin_menu a').attr("href")
等于
"https://graph.facebook.com/oauth/authorize?client_id=145554402127660&display=popup&redirect_uri=http://pgp.dev/fb_receive&scope=publish_stream,rsvp_event,offline_access,email,user_about_me,user_activities,user_birthday,user_events,user_groups,user_interests,user_likes,user_location,user_notes,user_online_presence,user_photo_video_tags,user_status,user_website,read_friendlists"
所以我如何关闭这个弹出窗口
I know that you can close a window.open with window.close but is there another way. I have a popup that opens facebook connect and i want to shut the popup whenever the user connects to facebook and then refresh the parent window...I thought in the past i used
TARGET = "_top"
here is my code
$(document).ready(function(){
$('#signin_menu a').click(function (){
window.open(
$('#signin_menu a').attr("href"),
'mywindow',
'width=850,height=400'
);
return false;
});
})
Also
$('#signin_menu a').attr("href")
is equal to
"https://graph.facebook.com/oauth/authorize?client_id=145554402127660&display=popup&redirect_uri=http://pgp.dev/fb_receive&scope=publish_stream,rsvp_event,offline_access,email,user_about_me,user_activities,user_birthday,user_events,user_groups,user_interests,user_likes,user_location,user_notes,user_online_presence,user_photo_video_tags,user_status,user_website,read_friendlists"
So How do i close this popup
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以使用 open() 方法作为对象返回的创建的弹出窗口的 close() 方法:
要关闭,请执行以下操作:
You can use close() method of created popup that is returned by the open() method as object:
To close do the following:
你可以使用下面的
you can use the below