<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>截取身份信息</title>
<script language="javascript">
function jiequ()
{
var pid=form1.t1.value;
var temp1,temp2;
var year,month,day;
if(pid.length!=18)
{
alert("身份证号码长度有误");
}
else
{
temp1=pid.substr(0,17);
temp2=pid.substr(17,1);
if(isNaN(temp1)==false && ( temp2=="x"|| isNaN(temp2)&#
JS简单应用——身份证号码信息截取
最新推荐文章于 2023-09-13 14:34:13 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)