当我点击一个按钮,我需要点击两次,我该如何解决这个问题

时间:2017-03-11 01:38:47

标签: javascript html onclick

我正在使用firebase进行登录,但是当我点击登录按钮时,没有任何反应,除非我再次点击它。我怎样才能解决这个问题?我遗漏了所有与firebase相关的代码。 (它持续了很长时间)。如果你需要它我很乐意上传它。 在状态发生变化之前有东西但是我没有上传它(如果你需要的话,我很高兴)。

recurse(0, "abc");
    System.out.println(partitions.toString());

HTML:

firebase.auth().onAuthStateChanged(user => {
  if(user) {
    AfterAuth() 
  }

});
        // [END authwithemail]


    }
}


    function AfterAuth (argument) {
        console.log("hered")
        document.getElementById("PopUpDivLogin").style.display="none";
document.getElementById("ShowAfterLogin").style.display="block";
document.getElementById("ShowAfterLoginButton").style.display="block";
document.getElementById("ShowBeforeLogIn").style.display="none";

document.getElementById("ButtonLogContainer").style.display="none";
    }

谢谢,哈米什

0 个答案:

没有答案