1、银行卡格式输入:
<input onkeyup="this.value=this.value.replace(/(\d{4})(?=[^\s])/,'$1 ');" type="text" maxlength="23" />