表格:
<form name="htmlform" action="index.html" method="post"/>
<input type="text" id="companyname" name="companyname"/>
<span id='htmlform_companyname_errorloc' class='error'></span>
<input type="contact" id="contactperson" name="contactperson"/>
<span id='htmlform_contactperson_errorloc' class='error'></span>
<input type="submit" value="Submit"/>
</form>
验证:
<script type='text/javascript'>
// <![CDATA[
var frmvalidator= new Validator("htmlform");
frmvalidator.EnableMsgsTogether();
frmvalidator.addValidation("companyname","req","Please provide company name");
frmvalidator.addValidation("contactperson","req","Who is the contact person?");
// ]]>
</script>
如果表单成功提交,如何获得弹出窗口?
答案 0 :(得分:0)
我认为您需要将用户重定向到具有弹出屏幕的页面 案件是:
您需要在成功提交变量后设置变量,然后在视图中进行检查