登陆验证!!!

benqlch 2007-12-14 10:35:12
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>新建网页 1</title>
</head>
<script language="javascript">
function Mycheck(){
if(form1.username.value=="")
{alert("用户名称不能为空!!");form1.username.focus();return ;}
if(form1.password.value=="")
{alert("用户密码不能为空!!");form1.password.focus();return ;}
form1.submit();
}
</script>
<body>
<!--#include file="top.asp"-->
<table width="765" border="-1" align="center" cellpadding="0" cellspacing="0" bordercolor="#FFFFFF" bordercolorlight="#9CA6C6" bordercolordark="#CCE3FF" height="144">
<tr>
<td height="142" align="center" width="255" >
<div>
<table><tr><td>
<form name="form1" method="post" action="dl1.asp">
<table width="231" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#FFFFFF" bordercolorlight="#9CA6C6" bordercolordark="#CCE3FF" height="119">
<tr><td colspan=2>
<p align="center"><font size="5">登 录</font></td></tr>
<tr>

<td height="46" width="77">用户名称 </td>
<td height="46" width="148"><input name="username" type="text" id="username" ></td>
</tr>
<tr>
<td height="36" width="77">用户密码</td>
<td height="36" width="148"><input name="password" type="password" id="password" ></td>
</tr>
<tr>
<td colspan=2><p align="center"><input type="button" name="Submit" onclick="Mycheck()"value="登录">  
<input type="reset" name="Submit2" value="重置"></td>
</tr>
</table>
</form>
</td>
</tr>
</table></div>

<td height="142" align="center" width="255"><!--#include file="zx1.asp"--></td>
<td height="142" align="center" width="255" > 姓名:<%=session("name")%> 密码:<% =session("pwd") %> 等级:<%=session("dj")%></td>

</tr>
</table>
</body>
</html>

问题:为什么只有把<!--#include file="zx1.asp"-->这一句去了才能进行登陆验证啊!!!!!
...全文
119 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
jimmyyn 2007-12-14
  • 打赏
  • 举报
回复
代码写的太乱了,至少要有个判断
直接把

<td height="142" align="center" width="255"> <!--#include file="zx1.asp"--> </td>
<td height="142" align="center" width="255" > 姓名: <%=session("name")%> 密码: <% =session("pwd") %> 等级: <%=session("dj")%> </td>

都去掉
benqlch 2007-12-14
  • 打赏
  • 举报
回复
没有错误提示,只是在IE 的状态栏上出现网页错误!
mark271828 2007-12-14
  • 打赏
  • 举报
回复
错误提示是什么?

28,390

社区成员

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

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