大佬教程收集整理的这篇文章主要介绍了使一个 div 消失,另一个 div 出现在谷歌登录中,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
我正在制作一个网站,我正在使用 Google 标志 (oauth 2),我希望在用户登录时出现一个 div,另一个 div 消失。这是我目前的代码:
<Meta name="Google-signin-clIEnt_ID" content="20575446019-pm4nP7uisq70q5dct2kmbtkq246rmhsg.apps.Googleusercontent.com">
<script src="https://APIs.Google.com/Js/platform.Js" async defer></script>
<script>
function onSignIn(GoogleUser) {
var profile = GoogleUser.getBasicProfile();
console.log('name: ' + profile.getname());
document.getElementByID('lol').style.display = 'none';
document.getElementByID('app').style.display = 'inline-block';
</script>
<div ID="lol" class="lol">
<h1>I want this to appear when user enters page but disappear on Google sign in.</h1>
<p>Blah Blah Blah and other content in this div</p>
<div>
<div ID="app" class="app" display="none">
<h1> I want this div to not be visible when the user enters the page but be visible after user does the Google sign in</h1>
<p>Blah Blah Blah and other content in this div</p>
<div class="g-signin2" data-onsuccess="onSignIn" data-wIDth="220" data-height="50" data-longtitle="true"></div>
它工作不正常,我不知道出了什么问题... 感谢您的帮助!!!
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)
以上是大佬教程为你收集整理的使一个 div 消失,另一个 div 出现在谷歌登录中全部内容,希望文章能够帮你解决使一个 div 消失,另一个 div 出现在谷歌登录中所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。