0

该插件适用于所有浏览器的所有其他页面。在此页面插件中仅在 IE9 中有效,而在 FF、Chrome 中无效。在 FF 中,Chrome 表单提交时出现错误。

我应该发送我的 html...我包含我的 jquery 验证但仍然无法正常工作?

<script src="../inc/jquery.validationEngine-en.js" type="text/javascript" charset="utf-8"></script>
<script src="../inc/jquery.validationEngine.js" type="text/javascript" charset="utf-8"></script>

如果页面被加载警报正常工作......那么我应该点击按钮那里也没有工作验证..但是文件应该退出......

 <script type="text/javascript">
$(document).ready(function(){
alert("test");
    // binds form submission and fields to the validation engine
    $("#form_page").validationEngine(); 
});
</script>

我也发送html

<form name="form_page" id="form_page" enctype="multipart/form-data" method="post" action="/1MP1/ap/manufacturer_edit.php">
    <td>
                                                <div class="error_box">
                                                <div class="error_msg"> 
                                                    <img src="images/remove.png" alt=""/>                                                   
                                                </div>
                                            </div>  

      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr height="50px">
          <td width="29%" style="border-bottom:1px solid #e9eaeb; border-top:1px solid #e9eaeb;" align="right"><span class="addedittitles">Manufacturer Name</span></td>
          <td width="71%" style="border-bottom:1px solid #e9eaeb; border-top:1px solid #e9eaeb;"><span style="border-bottom:1px solid #e9eaeb;"><span class="faq_colomn_right">
            <input name="mfgName" type="text" id="mfgName" class="validate[required,maxSize[250]]" value="" maxlength="250" style="width:85%; border:1px solid #cdcdcf; height:22px;"/>
          </span>         
          </span></td>
        </tr>
        <tr>
          <td style="border-bottom:1px solid #e9eaeb; margin-top:10px; margin-bottom:10px;" align="right"><span class="addedittitles" style="margin-top:10px;">Description</span></td>
          <td style="border-bottom:1px solid #e9eaeb; "><span class="faq_colomn_right">
            <textarea name="mfgDesc" id="mfgDesc" class="validate[required]" cols="35" style="width:572px; order:1px solid #cdcdcf; height: 200px;">                                    </textarea>
          </span></td>
        </tr>
        <tr>
          <td style="border-bottom:1px solid #e9eaeb; margin-top:10px; margin-bottom:10px;" align="right"><span class="addedittitles">Website Url</span></td>
          <td style="border-bottom:1px solid #e9eaeb; "><span class="faq_colomn_right">
            <input class="validate[required,maxSize[250]]" name="mfgWebsiteURL" id="mfgWebsiteURL" type="text" value="" maxlength="250" style="width:85%; border:1px solid #cdcdcf; height:22px;"/>
          </span></td>
        </tr>
        <tr>
          <td style="border-bottom:1px solid #e9eaeb; margin-top:10px; margin-bottom:10px;" align="right"><span class="addedittitles">Contact Name</span></td>
          <td style="border-bottom:1px solid #e9eaeb; "><span class="faq_colomn_right">
            <input class="validate[required,maxSize[250]]" name="mfgContactName" id="mfgContactName" type="text" value="" maxlength="250" style="width:85%; border:1px solid #cdcdcf; height:22px;"/>
          </span></td>
        </tr>
        <tr>
          <td style="border-bottom:1px solid #e9eaeb; margin-top:10px; margin-bottom:10px;" align="right"><span class="addedittitles">Phone No</span></td>
          <td style="border-bottom:1px solid #e9eaeb; "><span class="faq_colomn_right">
            <input class="validate[required,maxSize[250],custom[phone]]" name="mfgContactPhone"  id="mfgContactPhone" type="text" value="" maxlength="100" style="width:85%; border:1px solid #cdcdcf; height:22px;"/>
          </span></td>
        </tr>
        <tr>
          <td style="border-bottom:1px solid #e9eaeb; margin-top:10px; margin-bottom:10px;" align="right"><div class="addedittitles">Email</div></td>
          <td style="border-bottom:1px solid #e9eaeb; "><span class="faq_colomn_right">
            <input class="validate[required,maxSize[250],custom[email]]" name="mfgContactEmail"  id="mfgContactEmail" type="text" value="" maxlength="250" style="width:85%; border:1px solid #cdcdcf; height:22px;"/>
          </span></td>
        </tr>
<tr align="right">
    <td height="40px;" align="right" colspan="4"><input name="save" type="submit" id="save" value="Save" class="button1" />                                                     
<input name="id" type="hidden" id="id" value="new">
</td>
</tr>  </table>
       </td>
       </form>
4

1 回答 1

1

有一个很棒的验证插件,称为 jquery 验证,请参见此处

请记住,您应该在包含其他插件之前包含 jQuery。

于 2012-05-17T13:40:13.643 回答