简体   繁体   English

如何使用 Google Apps 脚本中的按钮打开另一个页面?

[英]How do I open another page with a button in Google Apps Scripts?

I am new to programming and I have a question.我是编程新手,我有一个问题。 I have my main web page (boton) with three buttons and I want to create a function so that the button can open a page (pagina1 or pagina2) with Google App Script or GAS.我有我的主要 web 页面(boton)和三个按钮,我想创建一个 function 以便按钮可以使用 Google App Script 或 GAS 打开页面(pagina1 或 pagina2)。 How can I do that?我怎样才能做到这一点? I just have this, which is the structure of the buttons on the boton page.我就是这个,就是boton页面上按钮的结构。

在此处输入图像描述

and this is how it shows on the page这就是它在页面上的显示方式

在此处输入图像描述

Well, Instead of using "GAS" you can use the anchor tag of HTML好吧,您可以使用HTML的锚标签,而不是使用“GAS”

Like :- here is an example - Google喜欢:-这是一个例子-谷歌

You need to change the website link and your button text, and BOOM!您需要更改网站链接和按钮文本,然后 BOOM!

Thanks;)谢谢;)

Add the '_blank' in your script:在脚本中添加“_blank”:

<button class="btn" onclick="window.open('https://stackoverflow.com', '_blank');">stackoverflow</button>

Well, Instead of using "GAS" you can use the anchor tag of HTML好吧,您可以使用 HTML 的锚标签,而不是使用“GAS”

Like:- here is an example - Google喜欢: - 这是一个例子 -谷歌

You need to change the website link and your button text, and BOOM!您需要更改网站链接和按钮文本,然后 BOOM!

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何编辑范围? // 谷歌课堂控制谷歌应用脚​​本中学生访问权限范围 - How do I edit scopes? // Google Classroom control permission scopes in google apps scripts for student access 如何在我的Google Apps脚本/ Google表格HTML中包含脚本? - How do I include scripts in my Google Apps Script/Google Sheets HTML? 如何获取javascript以获取打开另一个html页面的按钮? - How do I get javascript to get a button to open another html page? 如何改进用于在 Google Apps 脚本中拖动多个单元格的脚本? - How do I improve my script for dragging multiple cells in Google Apps Scripts? 如何让谷歌应用脚本服务的剩余每日邮件配额始终如一地工作? - How do I get the remaining daily mail quota of google apps scripts service to work consistently? 单击页面上的另一个按钮时如何打开导航/选项卡? - How to open the nav/tab when I click another button on the page? 如何在谷歌应用程序脚本中使用setValues屏蔽值? - How can I mask values using setValues in google apps scripts? 如何从 Puppeteer 中的按钮打开新的 window 页面? - How do I open a new window page from a button in Puppeteer? 如何在 Google Apps Scripts 字典中使用数组作为键,并在遍历字典时保持其数组结构 - How do I use an array as a key in a Google Apps Scripts dictionary and have it maintain its array structure while I iterate over the dictionary 如何在Google脚本中组合功能? - How do I combine functions in Google Scripts?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM