the commuter 电影:这段代码那错了

来源:百度文库 编辑:神马品牌网 时间:2024/05/05 18:51:50
这 是一端找回个人密码的代码 ,要求先输入注册过的用户名 ,才能显示下面2的区域获得密码问题,不然显示上面1的区域。然而我实验了多次,无论我填写的用户名是否正确 ,都只显示1的区域 错在那里呀?
1
<body>
<p> </p>
<p>
<% If Recordset1.EOF And Recordset1.BOF Then %>
你不是注册用户 ,或填写错误 ---------------<a href="a.asp">返回</a>
<% End If ' end Recordset1.EOF And Recordset1.BOF %>
</p>
<p> </p>

2

<form id="form1" name="form1" method="post" action="c.asp">
<% If Not Recordset1.EOF Or Not Recordset1.BOF Then %>
<p>您的密码问题是<%=(Recordset1.Fields.Item("wenti").Value)%>
<input name="hiddenField" type="hidden" value="<%=(Recordset1.Fields.Item("wenti").Value)%>" />
</p>
<p>请填写密码答案
<label>
<input name="textfield" type="text" size="10" maxlength="10" />
</label>
</p>
<p>
<label>
<input type="submit" name="Submit" value="提交" />
</label>
</p>
<% End If ' end Not Recordset1.EOF Or NOT Recordset1.BOF %>
</form>
<p> </p>
</body>
</html>
<%
Recordset1.Close()
Set Recordset1 = Nothing
%>
不行啊老大 ,烦躁呀 那里错拉

<% If Recordset1.EOF And Recordset1.BOF Then %>
改为:
<% If Recordset1.EOF OR Recordset1.BOF Then %>

<% If Recordset1.EOF And Recordset1.BOF Then %>
你不是注册用户 ,或填写错误 ---------------<a href="a.asp">返回</a>
<% End If ' end Recordset1.EOF And Recordset1.BOF %>
</p>
如果不是注册用户就显示这里,是吧?

如果是注册用户呢?else哪里去了
你没有指定 else执行的语句
怎么可能跳转到2?