jsInputFormatter is a easy way to format HTML inputs with masks.
Syntax:
import the jsInputFormatter.js
set the function below on oninput event to input format.
inputFormatter(event,mask)
event: element input event
mask: String with mask
# - Any valid number
* - Anything
Others characters don't change
inputDecimalFormatter(event,decimal)
event: element input event
decimal: Integer number with decimal
Example 1 - Credit Card:
Credit Card #### #### #### ####
<input id="cartao" type="text" #### #### ####')"/>
Example 2 - Phone number:
Brazil Phone number (##)*####-####
<input id="phone" type="text" >
Example 3 - Decimal number :
Decimal 0.00
<input id="valor" type="number" value='0.00'/>
Features
- input formatter
- format mask
- javascript formatter
License
GNU General Public License version 3.0 (GPLv3)Follow jsInputFormatter
You Might Also Like
MongoDB Atlas runs apps anywhere
MongoDB Atlas gives you the freedom to build and run modern applications anywhere—across AWS, Azure, and Google Cloud. With global availability in over 115 regions, Atlas lets you deploy close to your users, meet compliance needs, and scale with confidence across any geography.
Rate This Project
Login To Rate This Project
User Reviews
Be the first to post a review of jsInputFormatter!