zoukankan      html  css  js  c++  java
  • Jquery ValidationEngine 修改验证提示框的位置

    <!doctype html>
    <html lang="en">
     <head>
      <meta charset="UTF-8">
      <meta name="Generator" content="EditPlus®">
      <meta name="Author" content="">
      <meta name="Keywords" content="">
      <meta name="Description" content="">
      <title>自定义验证框位置</title>
      <link rel="stylesheet" type="text/css" href="ValidationEngine/css/validationEngine.jquery.css"/>
      <script src="ValidationEngine/js/jquery-1.8.2.min.js"></script>
      <script src="ValidationEngine/js/jquery.validationEngine.js"></script>
      <script src="ValidationEngine/js/languages/jquery.validationEngine-zh_CN.js"></script>
      <script type="text/javascript">
            jQuery(document).ready(function () {
                jQuery("#frmJquery").validationEngine({
                    onFormSuccess: function () {
                        return false;
                    },
                    onFormFailure: function () {
                        return false;
                    }
                });
    
                jQuery("#frmJquery").validationEngine('attach', {
                    relative: true,
                    overflownDIV: "#divPostion",
                    promptPosition: "bottomLeft" //验证弹出框的位置,topRight,topLeft,bottomRight,bottomLeft,centerRight,centerLeft,inline
                });
            })
    
    
            function showMsg(msg)
            {
                layer.msg(msg, { time: 1000 });
            }
        </script>
     </head>
     <body>
     <div id="divPostion">
     <form id="frmJquery">
      姓名:<input type="text" id="txtName" class="validate[required]"><br/><br/>
      手机:<input type="text" id="txtPhone" class="validate[custom[phone]]">
      <form>
      </div>
     </body>
    </html>
    View Code
  • 相关阅读:
    new一个对象的时候,实际做了些什么
    ES6 class——getter setter音乐播放器
    vue中引入公用过滤器?
    this详解下
    012天this详解上
    011天之跨域资源共享CORS
    010天JSON.stringify()详解
    009天之跨浏览器的事件处理程序
    使用XHR上传文件要不要了解一下?
    简单化最小化语句数
  • 原文地址:https://www.cnblogs.com/ZJ199012/p/4538933.html
Copyright © 2011-2022 走看看