Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
788 views
in Technique[技术] by (71.8m points)

google apps script - how to get value entered in UI created with the new HtmlService

I can get/access the value of the UI elements using,

e.parameter.elementname or app.getElementById(id) 

if i create UI using UiApps or GUI builder like,

app.add(app.loadComponent("MyGui"));
app.getElementbyId('textbox1').setText("Hi");

If i use, HtmlService.createHtmlOutputFromFile('myPage'); How can i get the values entered in the html form - elements ?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...