javascript描写银行卡号
function formatCardNo(cardNo){
var result = [],len = cardNo.length;
var j = 0;
for(var i = 0 ; i < len;i++){
if(cardNo[i] == " "){
continue;
}
j++;
result.push(cardNo[i]);
if(j % 4 ==0 && i != len-1){
result.push(" ")
}
}
return result.join("");
}