/**
* 通过身份证号码得到出生年月日
*
* @param str
* 身份证号码 return 2000-01-01/1999-01-01 出生年月日
*/
function getBirthDayFromCard(str) {
var inputStr = str.toString();
var year;
var month;
var day;
if (inputStr.length == 18) {
year = inputStr.substring(6, 10);
month = inputStr.substring(10, 12);
day = inputStr.substring(12, 14);
} else {
year = inputStr.substring(6, 8);
year = "19" + year;
month = inputStr.substring(8, 10);
day = inputStr.substring(10, 12);
}
return year + "-" + month + "-" + day;
}