Is there a way to code this using html / css?
I want to format it so that the two digits are "/" in the expiry field. I simply put a "/" in the form on my web page to show what I'm trying to do.
Credit Card Number:
<input class="inputCard" type="text" name="creditCard1" id="creditCard1"/>
-
<input class="inputCard" type="text" name="creditCard2" id="creditCard2"/>
-
<input class="inputCard" type="text" name="creditCard3" id="creditCard3"/>
-
<input class="inputCard" type="text" name="creditCard4" id="creditCard4"/>
<br />
Card Expiry:
<input class="inputCard" type="text" name="expiry" id="expiry"/>
I want to format it so that it only accepts four numbers in each text field of a credit card.

I don't need code to validate my data with javascript (I know how to do this). I am struggling with html design.
anon
source
share