输入身份证 直接获取到 年月日
`
<input type=text v-on:oninput="getBirthday"/>
getBirthday(idCard) {
var birthday = "";
if(idCard != null && idCard != ""){
if(idCard.length == 15){
birthday = "19"+idCard.substr(6,6);
} else if(idCard.length == 18){
birthday = idCard.substr(6,8);
}
birthday = birthday.replace(/(.{4})(.{2})/,"$1-$2-");
}
this.birthday=birthday;
},
`


浙公网安备 33010602011771号