Practical JS Form Verification tips

Source: Internet
Author: User

ErrMsg is an array of error messages to facilitate customization. errName is an array of component names corresponding to error messages, which can be a non-rich custom display mode, FormValid. allName records the number of Field names with verification rules, which can be used in custom.
<! DOCTYPE html PUBLIC "-// W3C // dtd xhtml 1.0 Transitional // EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <ptml xmlns = "http://www.w3.org/1999/xhtml"> <pead> <title> Form Verification prompt effect </title> <style type = "text/css"> body {color: #666666; font-size: 12px} h1 {font-size: 20px;} input {border: #999999 1px solid; background-color: # FFFFEE }. button2 {background-color: # FF9900; border-bottom: # E34A00 2px solid; border-right: # E34A00 2px solid; border-top: # FFB693 2px solid; border-left: # FFB693 2px solid; color: # FFFFFF; font-weight: bold} dl {font: normal 12px/15px Arial; position: relative; width: 350px;} dt {clear: both; float: left; width: 80px; padding: 4px 0 2px 0; text-align: left ;}dd {float: left; width: 200px; margin: 0 0 8px 0; padding-left: 6px ;}. hint {display: none; position: absolute; right:-160px; width: 200px; margin-top:-4px; border: 1px solid # c93; padding: 10px 12px; background: # ffc url (/upload/2009-11/20091104144511488. gif) no-repeat-10px 5px ;}. hint. hint-pointer {position: absolute; left:-10px; top: 5px; width: 10px; height: 19px; background: url (/upload/2009-11/20091104144511488. gif) left top no-repeat ;}</style> </pead> <body> Form Verification Result </p> </body> </ptml>
[Ctrl + A select all Note: If you need to introduce external Js, You need to refresh it to execute]

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.