我讓它變得簡單:我現(xiàn)在使用谷歌表單作為我的數(shù)據(jù)庫。在我為提交按鈕添加重置功能后,它再次將 JS 文件發(fā)送到谷歌表單的響應(yīng)頁面。你能幫我嗎 ?謝謝<form id="form" action="https://docs.google.com/forms/u/2/d/e/1FAIpQLSeBJHw1Q6YlwO_0s2OgMhuyQEj4PLvToM1N1G5BEYQRiZlCLQ/formResponse"> <label for="">It's FREE</label> <input type="text" placeholder="Full Name" class="inputs" id="input1" name="entry.1045366435"> <input type="email" placeholder="Email" class="inputs" id="input2" name="entry.1398681060"> <textarea cols="30" rows="10" placeholder="Message" id="input3" name="entry.403219718"></textarea> <input type="submit" id="submit" value="Send"> </form>$('#form').submit(function(e) { alert("Thanks for signing up. We will contact you as soon as we can."); e.preventDefault(); $.ajax({ url: "https://docs.google.com/forms/u/2/d/e/1FAIpQLSeBJHw1Q6YlwO_0s2OgMhuyQEj4PLvToM1N1G5BEYQRiZlCLQ/formResponse", data: $(this).serialize(), type: "POST", success: function(data) { $('#form')[0].reset() }, dataType: "xml", success: function(data) { console.log('Submission successful'); }, error: function(xhr, status, error) { console.log('Submission failed: ' + error); } });});//Alert + Disable google form response page
為什么點擊提交按鈕后無法清除數(shù)據(jù)?
梵蒂岡之花
2022-01-07 18:36:34