如何在提交 google 表单后重定向网站?

How to redirect website after submitting google form?

我在我的网站中使用google表单没有iframe标签,所以我没有找到如何写"thank you"并取消去google表单的响应页面。

这是 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>