部署到 Google App Scripts 时,是否有人看到“意外错误”的原因...... doPost 中的某些内容?运行该函数不会产生错误。
function doGet() {
var app = UiApp.createApplication();
var form = app.createFormPanel();
var flow = app.createFlowPanel();
flow.add(app.createTextBox().setName("textBox"));
flow.add(app.createListBox().setName("listBox").addItem("option 1").addItem("option 2"));
flow.add(app.createSubmitButton("Submit"));
form.add(flow);
app.add(form);
return app;
}
function doPost(eventInfo) {
var app = UiApp.getActiveApplication();
var ss = SpreadsheetApp.getActiveSpreadsheet();
ss.getRange("A1:A1");
ss.getActiveRange().setValue("hello");
return app;
}