EDCARTECH IT WORLD

Getting You More Closer ...

Downloads

Downloads

Software,Script,Templates
Themes and Plugins for you, just Download them.

Learn

Tech & Programming

Quick start learning more tech tips and basic software development

Systems

Ed Systems

Both free and paid Edcartech systems with "self Demonstration".

(Javascript) Insert symbol after characters in input

Posted by
/ / Leave a comment

Hello Guys, for today’s JavaScript tutorial am going to show you how you can automatically include a symbol for Example “-“ in any text input field on an HTML page. This is very important in controlling user inputs in cases like phone numbers, Credit card number and others, the javascript code below is responsible for achieving this simple task.

the Jsfidle bellow will show the live usage of the code presented above

you can replace [2,2,2,2,2] with any number at all of your choice depending on the series you want to acheive, in the case of a class in an input declare the field like this $('.Your_Field_Key').keyup(function() { please note the dot before the field identification.

Edcartech

Leave a comment