0
我想通過JavaScript/JQuery在谷歌電子表格中添加一個新行。我不知道如何做到這一點,但這裏是我的嘗試:JQuery .ajax POST到Spreadsheets API?
var myJSONObject = {"entry": [
"gsx:name": name,
"gsx:email": email,
"gsx:phone": phone,
"gsx:guests": guests
]}
var json_uri = "https://spreadsheets.google.com/feeds/list/" + KEY + "/" + id + "/" + SECURE + "/values?alt=json"
$.ajax({
type: "POST",
url: json_uri,
//contentType: 'application/json',
data: myJSONobject
dataType: 'json',
success: function(data){
alert("row added!");
},
error: function(){
alert("error");
}
});
,但我不斷收到錯誤:(