I need to insert a space after every four characters while the user is typing a credit card number using JavaScript .
<input type="text" size="19" maxlength="19" data-stripe="number" placeholder="1234 5678 9012 3456">
What is the best way to accomplish this ?
See Question&Answers more detail:os