欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

validationEngine 表單驗(yàn)證插件使用實(shí)例代碼

 更新時(shí)間:2017年06月15日 12:03:21   作者:孟繁貴  
本文通過實(shí)例代碼給大家介紹了jquery validationEngine 表單驗(yàn)證插件效果,非常不錯(cuò),具有參考借鑒價(jià)值,需要的的朋友參考下吧

先給大家展示下效果圖,如果大家感覺不錯(cuò),請參考實(shí)現(xiàn)代碼:

廢話少說,直接上代碼,可拷貝直接運(yùn)行:

<!DOCTYPE html>
<html lang="zh">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <title>validationEngine 插件</title>
    <!--<link rel="stylesheet" type="text/css" href="css/validationEngine.jquery.css" rel="external nofollow" />-->
    <link  rel="external nofollow" rel="stylesheet">
    <style type="text/css">
      *{
        padding: 0;
        margin: 0;
      }
      #form{
        padding-left: 20px;
      }
      #form .line{
        padding: 10px 0;
        margin: 10px 0;
        border-top: 1px dashed #0044CC;
      }
    </style>
  </head>
  <body>
    <form action="" method="post" id="form">
      <div class='line'>
        必填項(xiàng)--輸入框
      </div>
      <input value="" class="validate[required]" type="text" name="req">
      <div class='line'>
        必填項(xiàng)--復(fù)選框
      </div>
      <input class="validate[required]" type="checkbox" name="agree">我同意服務(wù)協(xié)議
      <div class='line'>
        url驗(yàn)證
      </div>
      <input value="http://" class="validate[required,custom[url]]" type="text" name="url">
      <div class='line'>
        email驗(yàn)證
      </div>
      <input value="forced_error" class="validate[required,custom[email]]" type="text" name="email">
      <div class='line'>
        IP 地址(v4)
      </div>
      <input value="192.168.3." class="validate[required,custom[ipv4]]" type="text" name="ip">
      <div class='line'>
        數(shù)值
      </div>
      <input value="-33.87a" class="validate[required,custom[number]]" type="text" name="number">
      <div class='line'>
        整數(shù)
      </div>
      <input value="10.1" class="validate[required,custom[integer]]" type="text" name="integer">
      <div class='line'>
        相等運(yùn)算
      </div>
      <input value="karnius" class="validate[required]" type="password" name="password" id="password">
      <input value="kaniusBAD" class="validate[required,equals[password]]" type="password" name="password2" id="password2">
      <div class='line'>
        限制最小字符數(shù)
      </div>
      <input value="" class="validate[required,minSize[6]]" type="text" name="minsize">
      <div class='line'>
        限制最大字符數(shù)
      </div>
      <input value="0123456789" class="validate[optional,maxSize[6]]" type="text" name="maxsize">
      <div class='line'>
        輸入整數(shù)(必須大于或等于 -5)
      </div>
      <input value="-7" class="validate[required,custom[integer],min[-5]]" type="text" name="min">
      <div class='line'>
        輸入整數(shù)(必須小于或等于 50):
      </div>
      <input value="55" class="validate[required,custom[integer],max[50]]" type="text" name="max">
    </form>
    <!--<script src="../jquery/jquery-1.12.4.min.js" type="text/javascript" charset="utf-8"></script>-->
    <script src="https://cdn.bootcss.com/jquery/1.12.4/jquery.min.js"></script>
    <!--<script src="js/jquery.validationEngine.min.js" type="text/javascript" charset="utf-8"></script>-->
    <script src="https://cdn.bootcss.com/jQuery-Validation-Engine/2.6.4/jquery.validationEngine.min.js"></script>
    <!--<script src="js/jquery.validationEngine-zh_CN.min.js" type="text/javascript" charset="utf-8"></script>-->
    <script src="https://cdn.bootcss.com/jQuery-Validation-Engine/2.6.4/languages/jquery.validationEngine-zh_CN.min.js"></script>
    <script type="text/javascript">
      jQuery(document).ready(function() {
        jQuery('#form').validationEngine({
          scroll: false,
          promptPosition: 'centerRight',
          maxErrorsPerField: 1,
          showOneMessage: true,
          addPromptClass: 'formError-noArrow formError-text'          
        });
      });
    </script>
  </body>
</html>

以上所述是小編給大家介紹的validationEngine 表單驗(yàn)證插件使用實(shí)例代碼,希望對大家有所幫助,如果大家有任何疑問請給我留言,小編會及時(shí)回復(fù)大家的。在此也非常感謝大家對腳本之家網(wǎng)站的支持!

相關(guān)文章

  • jQuery操作value值方法介紹

    jQuery操作value值方法介紹

    這篇文章介紹了jQuery操作value值的方法,文中通過示例代碼介紹的非常詳細(xì)。對大家的學(xué)習(xí)或工作具有一定的參考借鑒價(jià)值,需要的朋友可以參考下
    2022-03-03
  • jquery css 選擇器演示代碼

    jquery css 選擇器演示代碼

    這篇文章對于剛開始學(xué)習(xí)jquery的css 選擇器的朋友是個(gè)不錯(cuò)的參考,大家可以看實(shí)例演示即可。
    2010-05-05
  • JQuery操作與遍歷元素并設(shè)置其屬性、樣式和內(nèi)容

    JQuery操作與遍歷元素并設(shè)置其屬性、樣式和內(nèi)容

    本文詳細(xì)講解了JQuery操作與遍歷元素并設(shè)置其屬性、樣式和內(nèi)容的方法,文中通過示例代碼介紹的非常詳細(xì)。對大家的學(xué)習(xí)或工作具有一定的參考借鑒價(jià)值,需要的朋友可以參考下
    2022-04-04
  • jquery中map函數(shù)與each函數(shù)的區(qū)別實(shí)例介紹

    jquery中map函數(shù)與each函數(shù)的區(qū)別實(shí)例介紹

    &#8203;jquery中的each函數(shù)和map函數(shù)的用法看起來差不多,但其實(shí)還是有一點(diǎn)區(qū)別的,each返回的是原來的數(shù)組,并不會新創(chuàng)建一個(gè)數(shù)組。而map方法會返回一個(gè)新的數(shù)組
    2014-06-06
  • 關(guān)于jQuery對象數(shù)據(jù)緩存Cache原理以及jQuery.data詳解

    關(guān)于jQuery對象數(shù)據(jù)緩存Cache原理以及jQuery.data詳解

    網(wǎng)上有很多教你怎么使用jQuery.data(..)來實(shí)現(xiàn)數(shù)據(jù)緩存,但有兩個(gè)用戶經(jīng)常使用的data([key],[value])和jQuery.data(element,[key],[value])幾乎沒有什么文章說清楚它們兩的區(qū)別,所以我用到了,研究下分享給大家。
    2013-04-04
  • jquery easyui的tabs使用時(shí)的問題

    jquery easyui的tabs使用時(shí)的問題

    相信很多人用過jquery easyui,這個(gè)東西非常好用,界面也很美觀,你都不需要在界面上花太多的工夫,例子程序也比較完善,基本上看下例子就能很好的使用easyui了,很方便。
    2010-03-03
  • jquery 插件學(xué)習(xí)(一)

    jquery 插件學(xué)習(xí)(一)

    jquery插件,有幾種方法,有全局的,有對象方法的,一直覺得jquery插件迷迷糊糊,這陣子特地研究下,供那些像我一樣的初學(xué)者借鑒下。嘻嘻
    2012-08-08
  • jQuery animate和CSS3相結(jié)合實(shí)現(xiàn)緩動(dòng)追逐效果附源碼下載

    jQuery animate和CSS3相結(jié)合實(shí)現(xiàn)緩動(dòng)追逐效果附源碼下載

    這篇文章主要介紹了jQuery animate和CSS3相結(jié)合實(shí)現(xiàn)緩動(dòng)追逐效果的相關(guān)資料,需要的朋友可以參考下
    2016-04-04
  • javascript jQuery $.post $.ajax用法

    javascript jQuery $.post $.ajax用法

    這是一個(gè)簡單的 POST 請求功能以取代復(fù)雜 $.ajax 。請求成功時(shí)可調(diào)用回調(diào)函數(shù)。如果需要在出錯(cuò)時(shí)執(zhí)行函數(shù),請使用 $.ajax。
    2008-07-07
  • jQuery 動(dòng)畫彈出窗體支持多種展現(xiàn)方式

    jQuery 動(dòng)畫彈出窗體支持多種展現(xiàn)方式

    今天剛寫的利用jQuery動(dòng)畫彈出窗體,支持了string、Ajax、iframe、controls四種展現(xiàn)方式,具體細(xì)節(jié)下面慢慢介紹,先看效果圖。
    2010-04-04

最新評論