我的页面上有以下表格:
<iframe id="hidden_iframe" name="hidden_iframe" onload=
"if(submitted) {window.location='thank-you.html';}" style=
"display:none;"></iframe>
<div class="form-wrap" id="newsletter">
<form action=
"https://docs.google.com/forms/d/1ckysxoBGBaN_sKGFVda2D0cxR0muzhm6LeUb3PDfId0/formResponse"
class="newsletter-form" id="newsletter-form" method="post" name=
"newsletter-form" onsubmit="submitted=true;" target="hidden_iframe">
<input class="ss-q-short" dir="auto" id="entry_1476137342" name=
"entry.1476137342" required="" title="Must be a valid email address"
type="email" value=""> <input name="draftResponse" type="hidden" value=
"[,,"1794978808793485775"]"> <input name="pageHistory" type=
"hidden" value="0"> <input name="fbzx" type="hidden" value=
"1794978808793485775"> <input id="ss-submit" name="submit" type=
"submit" value="Submit">
</form>
</div>
正如您所看到的,此表单基本上是一个Google表单,在提交时应该重定向到thank-you.html
页面。基本上这肯定应该工作,但我进入chrome控制台:
XMLHttpRequest cannot load https://docs.google.com/forms/d/1ckysxoBGBaN_sKGFVda2D0cxR0muzhm6LeUb3PDfId0/formResponse. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access.
有什么建议吗?
我非常感谢你的回答!