意外的标记

问题描述

我和我的朋友正在尝试从头开始制作一个网站,而我们几乎从未接触过 html。我们有一个私有域,但我们刚刚开始,似乎不知道如何定义在第 29 行发现的这个意外标记。任何帮助将不胜感激。这是限制我们运行代码的唯一因素(我认为)。

<a href="#" onclick="signOut();">Sign out</a>

image of line 29 (where token is said to be unexpected)

output

line 28-44

    <meta name="google-signin-scope" content="profile email">
    <meta name="google-signin-client_id" content="936710688088-5fupofi0g9i8nb2ua7tftc9gkt4ndhue.apps.googleusercontent.com">
    <script src="https://apis.google.com/js/platform.js" async defer>
    </script>
    <title></title>
</head>

<body>
    <div class="g-signin2" data-onsuccess="onSignIn" data-theme="dark"></div>
    <script>
        function onSignIn(googleUser) {
        // Useful data for your client-side scripts:
        var profile = googleUser.getBasicProfile();
        console.log("ID: " + profile.getId()); // Don't send this directly to your server!
        console.log('Full Name: ' + profile.getName());
        console.log('Given Name: ' + profile.getGivenName());
        console.log('Family Name: ' + profile.getFamilyName());
        console.log("Image URL: " + profile.getImageUrl());
        console.log("Email: " + profile.getEmail());

        // The ID token you need to pass to your backend:
        var id_token = googleUser.getAuthResponse().id_token;
        console.log("ID Token: " + id_token);
      }
    <a href="#" onClick="signOut();">Sign out</a>                                                  

  function signOut() 
  {
    var auth2 = gapi.auth2.getAuthInstance();
    auth2.signOut().then(function () 
    {
      console.log('User signed out.');
    });
  }

    </script>
    
</body>

</html>```

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...