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