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