速求帮助! ASP编写代码!!

来源:百度知道 编辑:UC知道 时间:2024/05/30 20:16:56
1、制作如下前台页面a.asp,相对应后台页面为b.asp.

2、制作后台b.asp,实现功能
a当用户输入姓名,密码为空时,提示用户"姓名,密码输入不能为空,请返回重填",同时返回两字链接到a.asp
b 当密码不在8-16位之间时,提示用户"密码必须在8-16位之间,请返回重填",同时返回两字链接到a.asp
c 如果用户输入符合a,b要求,则根据用户的输入显示"**,感谢您的支持!"(**为用户姓名)

<form action="b.asp" method="post" name="myform" onsubmit="return checkform();">
<input type="text" name="username">
<input type="text" name="password">
<input type="button" value="提交">
</form>
<script language=javascript>
function checkform()
if (myform.username=='') {alert('用户姓名不能为空');return false;}
if ((myform.password.length<8)||(myform.password.length>16)) {alert('用户密码必须为8-16位');return false;}
alert("感谢您的支持!")
return true;
</script