asp的几个问题
我需要做一个类似留言板的页面。遇到以下问题希望能帮忙解决下。
1、在登录界面我需要一个复选框,选中此复选框后锁定上面用户名和密码文本框,并且用户名此时被设定为“匿名”写入数据库。这个如何做到。
我的代码:
<form id="form1" name="form1" method="POST" action="<%=MM_LoginAction%>">
用户名:
<label>
<input type="text" name="textfield" />
</label>
密码:
<label>
<input type="password" name="textfield2" />
</label>
<input type="submit" name="Submit1" value="登录" />
<input type="button" name="Submit2" value="注册" onclick="window.location='./reg.asp';">
<p>
<label>
<input type="checkbox" name="checkbox" id="checkbox" value="" /> 匿名 </form>
2、现在我的验证码检测出了点问题,填写的验证码必须是前一次出现的验证码才可以确认通过,填写目前页面显示的验证码会被判定为不匹配。
我的验证码检测代码:
<SCRIPT LANGUAGE="JavaScript">
function check(){
if(document.form3.passcode.value!="<%= Session("Getcode") %>") {
document.form3.passcode.focus();
alert("验证码错误!");
return false;
}
3、然后我现在想在页面上方显示目前留言数,想调用数据库中表liuyanid的目前最大数来表示,如何做到?
谢谢