簡體   English   中英

提交谷歌表單后如何重定向網站?

[英]How to redirect website after submitting google form?

我在我的網站上使用了沒有 iframe 標簽的谷歌表單,所以我沒有找到如何寫“謝謝”並取消進入谷歌表單的響應頁面。

這是 html 代碼:

<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 id="" cols="30" rows="10" placeholder="Message" name="entry.403219718"></textarea>
                <input type="submit" id="submit" value="Send">
            </form>

<script type="text/javascript" src="form.js"></script>

我需要在js文件中寫什么? 非常感謝!

您可以檢查表單是否已提交。 以下代碼使用jQuery。

 $('form').submit(function() { alert(1); // example code // add your code here });
 <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <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 id="" cols="30" rows="10" placeholder="Message" name="entry.403219718"></textarea> <input type="submit" id="submit" value="Send"> </form>

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM