Javascript 如何手动关闭twitter登录弹出窗口?
我已经使用为我的站点创建了自定义的twitter登录按钮。我的问题是,我想手动关闭twitter登录弹出窗口,因为我的弹出窗口不会自动关闭,因为它会重定向到我提供的url,并且不会关闭 下面是我正在使用的代码:Javascript 如何手动关闭twitter登录弹出窗口?,javascript,jquery,html,Javascript,Jquery,Html,我已经使用为我的站点创建了自定义的twitter登录按钮。我的问题是,我想手动关闭twitter登录弹出窗口,因为我的弹出窗口不会自动关闭,因为它会重定向到我提供的url,并且不会关闭 下面是我正在使用的代码: twttr.anywhere(function (T) { var currentUser, screenName, profileImage, profileImageTag
twttr.anywhere(function (T) {
var currentUser,
screenName,
profileImage,
profileImageTag;
document.getElementById("tweet").onclick = function () {
T.signIn();
};
T.bind("authComplete", function (e, user) {
window.location.reload();
});
if (T.isConnected()) {
currentUser = T.currentUser;
var add = currentUser.data('name'); //Getting user name from its twitter account
var n = add.split(" ");
document.getElementById('firstName').value = n[0];
alert(document.getElementById('firstName').value);
document.getElementById('LastNm').value = n[1];
//T("#twitter-connect-placeholder").connectButton();
twttr.anywhere.signOut();
} else {
//T("#twitter-connect-placeholder").connectButton();
/* Making the text box value empty*/
document.getElementById('firstName').value = "";
document.getElementById('LastNm').value = "";
/* Making the text box value empty*/
};
});
如果您根本不使用jquery,为什么要将它作为标记呢?我在代码的其他部分使用jquery,并且我使用了jquery标记,这样,如果有任何关于jquery的解决方案,我也可以使用它。