![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
<!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>