0

我已经搜索了几个小时的董事会,所以请不要有刻薄的答案。

以下不会从 jQuery 调用我的表单处理程序

<body>
<h1>Request A Consultation</h1>
<form id="consult_request" name="consult_request" method="post" action="">
  <table width="500" border="0" cellspacing="5" cellpadding="0">
    <tr>
      <td width="132"><label for="firstName">First Name</label></td>
      <td width="353"><input type="text" name="firstName" id="firstName" class="input required" /></td>
    </tr>
    <tr>
      <td><label for="lastName">Last Name</label></td>
      <td><input type="text" name="lastName" id="lastName" class="input required" /></td>
    </tr>
    <tr>
      <td><label for="emailAddress">Email Address</label></td>
      <td><input type="email" name="emailAddress" id="emailAddress" class="input required" /></td>
    </tr>
    <tr>
      <td><label for="emailConfirm">Verify Email Address</label></td>
      <td><input type="email" name="emailConfirm" id="emailConfirm" class="input required" equalTo="#emailAddress" /></td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td><input type="submit" name="button" id="button" value="Send Request »" class="button"  /></td>
    </tr>
  </table>
</form>
<script>
  $('#consult_request').validate({
    submitHandler: function(form){
        jQuery(form).ajaxSubmit({url: '/_interface/process/testvars.asp', type: 'post'});
    }
  });
</script>
</body>
</html>

注意:我只使用布局表,因为它是遗留代码。我自己更了解。

我的表格在 /_interface/content/popups/request.asp

4

1 回答 1

0

required 属性不应该在类之外吗?

<table width="500" border="0" cellspacing="5" cellpadding="0">
<tr>
  <td width="132"><label for="firstName">First Name</label></td>
  <td width="353"><input type="text" name="firstName" id="firstName" class="input" required/></td>
</tr>
于 2013-06-13T04:09:08.497 回答