我在表单上使用实时验证脚本,当字段正确填充时,会弹出一个弹出窗口。
我正在尝试使用表单重置按钮清除这些弹出窗口,重置按钮将清除所有字段输入,但javascript弹出仍然存在。
使用的脚本 - http://livevalidation.com/
JSFiddle显示问题 - http://jsfiddle.net/adamskee/e5qQQ/
谢谢; - )
<form id="form_email_348177" enctype="multipart/form-data" action="" method="post">
<div class="formwrapper">
<h3>1. Enter your contact details here</h3>
<div class="questio">
<div class="formquest">Your Name*</div>
<div class="formextras">Add your First and Surname</div>
</div>
<div class="forminput"><input type="text" name="q348177:q1" value="" size="30" maxlength="300" id="q348177_q1" class="sq-form-field" />
<script type="text/javascript">
var q348177_q1 = new LiveValidation('q348177_q1');
q348177_q1.add(Validate.Presence);
</script>
</div>
<div class="clear"></div>
<div class="questio">
<div class="formquest">Company Name*</div>
<div class="formextras">Add your Company Name</div>
</div>
<div class="forminput"><input type="text" name="q348177:q2" value="" size="30" maxlength="300" id="q348177_q2" class="sq-form-field" />
<script type="text/javascript">
var q348177_q2 = new LiveValidation('q348177_q2');
q348177_q2.add(Validate.Presence);
</script>
</div>
<div class="clear"></div>
<div class="questio">
<div class="formquest">Company Address*</div>
<div class="formextras">Postal Address</div>
</div>
<div class="forminput"><input type="text" name="q348177:q3" value="" size="30" maxlength="300" id="q348177_q3" class="sq-form-field" />
<script type="text/javascript">
var q348177_q3 = new LiveValidation('q348177_q3');
q348177_q3.add(Validate.Presence);
</script>
</div>
<div class="clear"></div>
<div class="buttons">
<input type="submit" name="form_email_348177_submit" value="Submit" class="submitbutton" id="form_email_348177_submit" onmouseover="" style="cursor: pointer;" />
<input type="reset" name="form_email_348177_reset" value="Reset" class="resetbutton" id="form_email_348177_reset" onmouseover="" style="cursor: pointer;" />
</div>
</form>