Commas in HTML INPUT textfields for better readability
Sometimes, when a user enters numbers into a HTML INPUT text field, he/she enters commas too for readability esp in the case of financial inputs.
But when we send the input data via a form to the backend script for storing into a database, say MySQL database, we don't want the commas in the SQL INSERT statement.
So here's a script to show the commas while typing and remove the commas on hitting the submit button.
HTML, JavaScript | Sunday, April 28, 2019 |
0 comments:
Post a Comment