如何在asp代码中设置让身份证可以填写字母?

来源:百度知道 编辑:UC知道 时间:2024/06/11 05:00:25
我的asp表单中需要让浏览者填写身份证号码,可是我现有的源程序只能填写数字不能写字母,如何能让浏览者填写带字母的身份证号码啊?这是源代码<input type="text" name="code" size="20" maxLength=18 value="<%=rs("code")%>" >
function checkmod()
{
if (isInvalidDate(register.bday.value,"-")==true){
alert("请正确填写您的出生日期(例如:1978-08-12)!");
register.bday.focus();
return (false);
}
if (isNaN(register.code.value)){
alert("身份证号码只能填数字!");
register.code.focus();
return (false);
}
if (checkstring("身份证号码", document.register.code.value, false)) {
document.register.code.focus();
return true;
}
if ((register.code.value.length!=15) && (register.code.value.length!=18 )) {
alert("请正确填写您的身份证号码!");
register.code.focus();
return (false);
}
这个就是限制的源代码!!
我已经解决问题了,具体这样的:
if (isNaN(register.code.v

asp过程中判断
或者数库中code字段是int

这里并没有限制哈..

应该是在asp中进行判断的..

必须在后台程序修改..

---------------------------------------
if (isNaN(register.code.value)){
alert("身份证号码只能填数字!");
register.code.focus();
return (false);
}
if (checkstring("身份证号码", document.register.code.value, false)) {
document.register.code.focus();
return true;
}

把这两个if去掉