Javascript-based simple tip plug-in-javascript based on regular expressions

Source: Internet
Author: User
This article mainly introduces the simple prompt plug-in based on regular expressions. it is a text box detection plug-in with strong compatibility but lightweight files. we recommend this plug-in for your reference. This article describes the simple tip plug-in based on regular expressions and shares it with you for your reference. The details are as follows:
This is a simple prompt plug-in that implements regular expressions based on javascript. this plug-in is based on regular expressions for text box detection and has a strong versatility. you can use this plug-in your instance.
Run: ------------------- View Results -------------------

Tips: if the browser cannot run properly, you can try to switch the browsing mode.
Key code:

$ (Document ). ready (function () {$ ("# message "). inputNotes ({sexwarning: {pattern:/(^ | \ s) porn (\ s | $)/ig, type: 'warning', text: 'Do not type "sex "! '}, Numbersnote: {pattern:/[0-9]/, type: 'note', text: 'Do not type numbers! '}});});

The code shared for you is as follows:

  
   Simple prompt plug-in based on regular expressions  

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.