输入身份证号后自动生成生日怎么实现?

来源:百度知道 编辑:UC知道 时间:2024/05/16 03:43:22
我在输入身份证号后,自动在下一个text里生成生日怎么实现?有没有直接可以用的控件,我的是ASP,用代码又该怎样实现,大哥们帮帮忙,有点急.

谢谢
有没有代码让我看看啊,,

完整的代码,我运行过,还好,15和18位都可以自行调节

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>
<%
dim bir,sfz
sfz=request("sfz")
if len(sfz)<18 then
bir=mid(sfz,7,8)
bir=mid(bir,1,4)&"年"&mid(bir,5,2)&"月"&mid(bir,7,2)&"日"
else
bir=mid(sfz,5,6)
bir="19"&mid(bir,1,2)&"年"&mid(bir,3,2)&"月"&mid(bir,5,2)&"日"
end if
%>
<body>
<form action="" method="post">
输入身份证号
<input name="sfz" type="text" value="371082810304001" />
<input type="submit" name="Submit" value=