[英]How to post form data to Google Apps Script
What is the best/easiest way to post form data from my HTML page to my GAS script? 将表单数据从HTML页面发布到GAS脚本的最佳/最简便方法是什么?
$(document).ready(function() {
$.getJSON(SCRIPT_URL+"?callback=?", { method:"addRow"}, function (data) { alert(JSON.stringify(data)); });
});
If you are using Apps Script HTML Service, you can use google.script.run
. 如果您使用的是Apps Script HTML Service,则可以使用
google.script.run
。
Google Documentation - Client-side API - call server-side Apps Script functions Google文档-客户端API-调用服务器端Apps脚本函数
From a app or site outside of Google, make an HTTP Request to the Apps Script URL. 在Google以外的应用或网站上,向“应用脚本网址”发出HTTP请求。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.