回首1998 是什么意思:javascript编程题

来源:百度文库 编辑:高考问答 时间:2024/04/25 20:11:07
<html>
<head>
<title>info</title>
</head>
<script language="javascript">
<!--

function jc()
{
var a,b,c,d,e,f
a=document.form1.name.value;
if(document.form1.name.value==" ")
{
alert("用户名不能为空!");
}
b=Math.floor(document.form1.mima.value);
c=Math.floor(document.form1.mima.value);
if(document.form1.mima.value==" ")
{
alert("密码不能为空!");
}
d=Math.floor(document.form1.maile.value);
e=Math.floor(document.form1.pos.value);
E=e.length;
if(E<6&&E>6)
{
alert("邮编号码不能超过6位!");
}
f=Math.floor(document.form1.info.value);
F=f.length;
if(E<15&&E>18)
{
alert("身份证号在15-18之间!");
}
}
-->
</script>
<body>
<form name="form1" method="post" action="">
<p>用户名:
<input name="name" type="text" id="name">
</p>
<p>密码:
<input name="mima" type="text" id="mima">
</p>
<p>确认密码:
<input name="mima" type="text" id="mima">
</p>
<p>邮箱:
<input name="maile" type="text" id="maile">
</p>
<p>邮政:
<input name="post" type="text" id="pos">
</p>
<p>身份证:
<input name="info" type="text" id="info">
</p>
<p>
<input type="button" name="Submit" value="检查" onClick="jc()">
</p>
</form>

</p>
</body>
</html>

这是一个关于表单的题:做一个表单,里面加入个人资料,要求:1、有*的不能为空;2、密码=确认密码;3、邮政6位,数字;4、身份证号15-18位,数字。

刷分..............