<?php
?>
<script language="javascript">
function only(which, next, numberOfDigit,min,max) {
which.value = which.value.replace(/\D/g,'');
if( (which.value.length != numberOfDigit) || (parseInt(which.value)<min) || (parseInt(which.value)>max) ) {
which.focus();
}
else {
document.getElementById(next).focus();
}
}
</script>
Card Number<input type="text" name="card1" id="card1" size="4" maxlength="4" onkeyup="only(this, 'card2', 4, 0, 9999);" onblur="only(this, 'card2', 4, 0, 9999);" />
-<input type="text" name="card2" id="card2" size="4" maxlength="4" onkeyup="only(this, 'card3', 4, 0, 9999);" onblur="only(this, 'card3', 4, 0, 9999);" />
-<input type="text" name="card3" id="card3" size="4" maxlength="4" onkeyup="only(this, 'card4', 4, 0, 9999);" onblur="only(this, 'card4', 4, 0, 9999);" />
-<input type="text" name="card4" id="card4" size="4" maxlength="4" onkeyup="only(this, 'month', 4, 0, 9999);" onblur="only(this, 'card1', 4, 0, 9999);" />
|