我正在尝试构建一个 Web 应用程序,该应用程序可以从 Google 电子表格中的表单中记录数据。为此,我必须使用 JavaScript(JSON 或 AJAX 请求也可以),但我不能使用 Google Apps 脚本,因为我需要用户继续使用我的页面而 GAS 不允许这样做。
我不太精通 JSON 请求,但我尝试做一个附加请求:毫不奇怪,它不起作用,也不奇怪,我不知道为什么。
我不确定我用来发出请求的 URL 和代码是否正确,但不太清楚如何继续,很难知道我的代码有什么问题。
这是我的表格:
<form name="reqForm" id="reqForm" method="post" action="" accept-charset="UTF-8" enctype="application/json">
<input type="hidden" name="area" id="area" readonly/>
<input type="hidden" name="idN" id="idN" readonly/>
<input type="hidden" name="dataReq" id="dataReq" readonly />
<label for="nome">* Nome:</label>
<input type="text" id="nome" name="nome" placeholder="Il tuo nome" />
<label for="cognome">* Cognome:</label>
<input type="text" id="cognome" name="cognome" placeholder="Il tuo cognome" />
<label for="mat">* Matricola:</label>
<input type="text" id="mat" name="mat" placeholder="La tua matricola" …Run Code Online (Sandbox Code Playgroud)