七日杀32位可以玩14.4:asp问题?

来源:百度文库 编辑:高考问答 时间:2024/07/04 19:20:08
数据库2个表,一个叫stu还有一个叫login
我要做个登陆页面,如果login里的"username"等于stu里的"username"
就跳到index页面上。
如果不等于就跳到index2页面上。

那就是判断两个值了,你可以写个form表单的提交事件啊
<script language="javascript">
function checkform(){
if (loginForm.stu.value==loginForm.login.value)
document.location.href="index.asp"
else
document.location.href="index2.asp"
</script>
<form method="post" action="随便写个"
name="loginform" onsubmit="return checkform();">
表单元素
</form>

我觉得这样简单 你看了?
sql="select *from login as a,stu as b where a.username=b.username"
你定个记录集 rs
if(rs.count>0)
response.redirect(index);