***certNo:身份证号
返回值:xxxx-xx-xx/男
function(certNo) {
var _len = certNo.length;//获取身份证的长度
let brith="";//出生日期 xxxx-xx-xx
let sex = "";//性别
//处理18位的身份证号码从号码中得到生日和性别代码
if (_len == 18){
brith=certNo.substr(6, 4) + "-" + certNo.substr(10, 2) + "-" + certNo.substr(12, 2),
sex:parseInt(certNo.substr(16,1)) % 2==1?"男":"女"
}
if (_len == 15) {
brith="19" + certNo.substr(6, 2) + "-" + certNo.substr(8, 2) + "-" + certNo.substr(10, 2),
sex=arseInt(certNo.substr(14,1)) % 2==1?"男":"女"
}
return brith +"/"+x;
},