如何获取在使用新 HtmlService 创建的 UI 中输入的值 [英] how to get value entered in UI created with the new HtmlService
本文介绍了如何获取在使用新 HtmlService 创建的 UI 中输入的值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我可以使用,获取/访问 UI 元素的值,
I can get/access the value of the UI elements using,
e.parameter.elementname or app.getElementById(id)
如果我使用 UiApps 或 GUI 构建器来创建 UI,
if i create UI using UiApps or GUI builder like,
app.add(app.loadComponent("MyGui"));
app.getElementbyId('textbox1').setText("Hi");
如果我使用,HtmlService.createHtmlOutputFromFile('myPage');如何获取在 html 表单中输入的值 - 元素?
If i use, HtmlService.createHtmlOutputFromFile('myPage'); How can i get the values entered in the html form - elements ?
推荐答案
作为客户端 JavaScript 的替代方案,您还可以创建简单的表单,提交给 doPost()
处理程序,然后处理程序进行处理数据.我创建了一个示例脚本来演示:运行、来源
As an alternative to client-side JavaScript, you can also create simple forms that submit to the doPost()
handler which then processes the data. I created a sample script to demonstrate: Run, Source
这篇关于如何获取在使用新 HtmlService 创建的 UI 中输入的值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文