0
我開始使用Google應用腳本。我有一個在表單提交時觸發的函數。我正嘗試訪問e中的屬性(formResponse class)。我沒有成功,我不明白我做錯了什麼。谷歌應用腳本入門 - 無法檢索表單提交參數
這裏是我的腳本:
function formSubmitReply(e) {
Logger.log(Utilities.jsonStringify(e));
Logger.log(Utilities.jsonStringify(e.getTimestamp()));
Logger.log("success");
}
當我提交表單,這是日誌:
[13-10-03 09:36:54:026 EDT] {"response":"FormResponse"}
這是從代碼成績單的錯誤:
[13-10-03 09:36:54:061 EDT] Échec de l'exécution du script : TypeError: Cannot find function getTimestamp in object [object Object]. (line 9, file "Code") [durée totale d'exécution : 0.034 secondes]