我在传递我希望用户在单击侧边栏上的按钮时转到的 URL 时遇到问题。
<body>
<p class="header">First we need to Authorize.</p>
<button class="center waves-effect waves-light btn" id="btn">Authorize</button>
<script>
document.getElementById("btn").addEventListener("click",authorize);
function authorize(){
google.script.run.authorizeSidebar();
}
</script>
</body>
我在 GS 上的代码是:
function authorizeSidebar(){
var Authservice = getAuthorization();
var authorizationUrl = Authservice.getAuthorizationUrl();
//Logger.log(authorizationUrl);
}
我能够在第二个函数上输出我需要的 URL,但是我很难将它从 GS 文件传递到 HTML 文件以供用户单击。
任何指导将不胜感激。
喵喵时光机
UYOU
随时随地看视频慕课网APP
相关分类