html - 意外的标记
问题描述
我和我的朋友正在尝试从头开始制作一个网站,但我们几乎没有接触过 html。我们有一个私有域,但我们刚刚开始,似乎不知道如何定义第 29 行发现的这个意外令牌。任何帮助将不胜感激。这是限制我们运行代码的唯一因素(我认为)。
<a href="#" onclick="signOut();">Sign out</a>
<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>```
解决方案
推荐阅读
- django - 如何在 django 中上传和查看图像
- wpf - How can I connect TriangleIndices(a.k.a. Triangles)?
- c# - 在 ASP MVC 5 中添加新视图时出现问题
- javascript - 从对象数组返回值
- javascript - 无法在 ajax 的帮助下使用选择选项更新数量
- c# - 如何避免自定义类的空实例化?
- php - 循环遍历具有 2 个或更多属性的 PHP 数组
- sql-server - 无法在 SSIS 表达式生成器中转换日期
- vim - 是否可以通过 vim-airline 中的分支状态更改分支背景颜色?
- c# - 在 Wcf 自定义发送端口上生成 SOAP 操作标头