谢谢您的网址未加载到表单iframe

时间:2018-06-09 10:30:13

标签: javascript html5 forms wixcode

我在wix网站上嵌入了一个表单 - 它看起来像这样:

<script type="text/javascript" src="https://premier.formstack.com/forms/js.php/formname"></script>

但感谢页面网址仍然在表单框架内加载。如何在提交时强制它在父页面上加载?

1 个答案:

答案 0 :(得分:0)

就像我看到的那样,你已经嵌入了 JavaScript ,当我选中时,它基本上会在文档中添加表单。

document.write("<!DOCTYPE html>"+"\n");
document.write("<html  lang=\"\">"+"\n");
document.write("<head>"+"\n");
document.write("    <meta charset=\"utf-8\" />"+"\n");
document.write("    <title>Formstack</title>"+"\n");
document.write("    <link rel=\"stylesheet\" type=\"text/css\" href=\"/forms/style.css\" />"+"\n");
document.write("</head>"+"\n");
document.write("<body>"+"\n");
document.write("    <div id=\"error\" class=\"formError\"><strong>ERROR:</strong> It looks like we couldn\'t find a form with that URL. Please double-check the URL and try again. If you\'re still having trouble, try contacting the person who sent you this form. (Error ID: b15b76df14cf6527b8ee)"+"\n");
document.write("        "+"\n");
document.write("                <br /><br />"+"\n");
document.write("        <form class=\"formErrorBack\" action=\"\">"+"\n");
document.write("            <input type=\"button\" value=\"Back\" onclick=\"history.back()\" />"+"\n");
document.write("        </form>"+"\n");
document.write("                "+"\n");
document.write("    </div>"+"\n");
document.write("</body>"+"\n");
document.write("</html>"+"\n");
document.write(""+"\n");

但您需要指定formname

当我用30_day_employee_review替换它时,您可以看到加载的表单。

<script type="text/javascript" 
src="https://premier.formstack.com/forms/js.php/30_day_employee_review"></script>

干杯欢迎来到StackOverflow!