//验证身份证的合法性
function IdentityCodeValid(code) {
var city={11:"北京",12:"天津",13:"河北",14:"山西"...city[code.substr(0,2)]){
tip = "地址编码错误";
pass = false;
}...else{
//18位身份证须要验证最后一位校验位
if(code.length == 18){...var factor = [ 7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2 ];
//校验位...= code[17]){
tip = "校验位错误";
pass =false;