代码如下: <% if request.form("yongh")<>"" and request.form("mim")<>"" then yongh=request.form("yongh") mim=request.form("mim") set cn=server.createobject("adodb.connection") cn.open"driver={sql server};server=D4;uid=sa;pwd=;database=fzx" set rs=server.createobject("adodb.recordset") sql="select * from yongh where name='"&yongh&"'and password='"&mim&"'" rs.open sql,cn,3,1 if rs.recordcunt=0 then h_error=1 else session("www_id")=rs("name") session("www_pwd")=rs("password") response.write("欢迎你登录!") end if end if cn.close %> <% if h_error=1 then <script language ="javascript"> alert("请输入的用户/密码错误,请重新输入!"); history.back(); </script> end if %> <script language ="javascript"> function mycheck() { if (form1.yongh.value=="") {alert("请输入您的用户名!");form1.yongh.focus;return;} if(form1.mim.value=="") {alert("请输入您的密码!");form1.mim.focus;return;} form1.submit();} </script>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <title>登录界面</title> </head> <body> <form name ="form1" action ="nihao.asp" method = "post"> //这句话什么意思不太清楚 用户 <input name = "yongh" type = "text" size = 6 maxlength = 20 > 密码 <input name ="mim" type ="password" size = 6 maxlength = 20 > <input name = "dengl" type = "button" value = "登录" onclick="mycheck()"> <A href='zhuce.asp' style='text-decoration: none;'>注册</A> </body> </html> 运行出现右边错误:HTTP 500 - 内部服务器错误 Internet Explorer 无法显示出运行的结果(界面) 请各位高手帮忙解决!