Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/412.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/88.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 如何手动关闭twitter登录弹出窗口?_Javascript_Jquery_Html - Fatal编程技术网

Javascript 如何手动关闭twitter登录弹出窗口?

Javascript 如何手动关闭twitter登录弹出窗口?,javascript,jquery,html,Javascript,Jquery,Html,我已经使用为我的站点创建了自定义的twitter登录按钮。我的问题是,我想手动关闭twitter登录弹出窗口,因为我的弹出窗口不会自动关闭,因为它会重定向到我提供的url,并且不会关闭 下面是我正在使用的代码: twttr.anywhere(function (T) { var currentUser, screenName, profileImage, profileImageTag

我已经使用为我的站点创建了自定义的twitter登录按钮。我的问题是,我想手动关闭twitter登录弹出窗口,因为我的弹出窗口不会自动关闭,因为它会重定向到我提供的url,并且不会关闭

下面是我正在使用的代码:

     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的解决方案,我也可以使用它。