究竟哪里错了

chenda8851 2006-06-20 02:48:08
if (document.form1.sfz.value.length!=16 or document.form1.sfz.value.length!=18)
{alert("身份证填写有错误,请核对!");
document.form1.name.focus();
return false;
}
这个究竟哪里错了,该怎么写
...全文
167 6 打赏 收藏 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
mingxuan3000 2006-06-20
  • 打赏
  • 举报
回复
&&
chenda8851 2006-06-20
  • 打赏
  • 举报
回复
那and用什么呢? 是&吗?
mingxuan3000 2006-06-20
  • 打赏
  • 举报
回复
晕,一楼的对
tatty_bad 2006-06-20
  • 打赏
  • 举报
回复
if ((document.form1.sfz.length != 16)|| (document.form1.sfz.length != 18))
{alert("身份证填写有错误,请核对!");
document.form1.sfz.focus();
return false;
}
mingxuan3000 2006-06-20
  • 打赏
  • 举报
回复
document.form1.sfz.value后没length属性
bingcha325 2006-06-20
  • 打赏
  • 举报
回复
if ((document.form1.sfz.value.length!=16)|| (document.form1.sfz.value.length!=18))
{alert("身份证填写有错误,请核对!");
document.form1.name.focus();
return false;
}
或不能用OR;

28,402

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧