1, bank card format input:
<input onkeyup="this.value=this.value.replace(/(\d{4})(?=[^\s])/,'$1 ');" type="text" maxlength="23" />