?? member_reg.asp
字號:
<%@ Language=VBScript %>
<%
username=Request("username")
'不要用Request.form("username"),注意從fill_reg反饋的內容
if username<>"" then
On Error Goto 0
strSql="SELECT * FROM yonghu WHERE yonghu='"+username+"'"
Set con=Server.CreateObject("ADODB.Connection")
Set rs=Server.CreateObject("ADODB.RecordSet")
con.Open Application("DBCon_ConnectionString")
Set rs=con.Execute(strSql)
if rs.EOF then
Session("username")=username
response.redirect "fill_reg.asp"
else
Response.Write("<p>對不起,您的用戶名已被占用,請重新選擇用戶名。</p>")
end if
con.Close
end if
%>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<SCRIPT ID=clientEventHandlersJS LANGUAGE=javascript>
<!--
function form_username_onsubmit() {
return check();
}
function check()
{
var username=document.form_username.username;
if(username.value.length<=0||username.value.length>8)
{
window.alert("用戶名不能為空且長度不能超過8個中文或漢字!");
username.focus();
return false;
}
if(HasBug(username.value))
{
window.alert("用戶名不能含有不規范字符!");
username.focus();
return false;
}
return true;
}
function HasBug(strtest)
{
var str = new String(strtest)
strMatch = /["']/;
if(str.search(strMatch)!=-1)
return true;
else
return false;
}
//-->
</SCRIPT>
<link rel="stylesheet" href="../html/3508.css">
<style type="text/css">
<!--
.botton { font-size: 12px; color: #000000; background-color: #FFFFE8}
.type1 { font-size: 12px; color: #000000; background-color: #ffffE8}
-->
</style>
<title>填寫用戶名</title>
</HEAD>
<BODY background="../images/bg1.gif">
<table width="740" border="0" cellspacing="0" cellpadding="0" align="center" height="40">
<tr>
<td width="217" height="39" align="center" valign="bottom"><img src="../images/smallmark.gif" width="120" height="25"></td>
<td width="523" valign="bottom" height="39"><a href="../default.asp">本站首頁</a>
>> 會員注冊</td>
</tr>
<tr>
<td colspan="2" height="1" bgcolor="006600"></td>
</tr>
</table>
<form method="post" action="member_reg.asp" id=form_username name=form_username LANGUAGE=javascript onsubmit="return form_username_onsubmit()">
<P> </P>
<P align=center>請填寫用戶名:</P>
<P align=center><注:用戶名長度不能大于8(全角字符長度算一)></P>
<P align=center>
<INPUT id=username name=username class="type1" size="20" maxlength="8">
<P align=center><INPUT id=reset1 name=reset1 type=reset value=重填 class="botton">
<INPUT id=submit1 name=submit1 type=submit value=確定 class="botton">
</P>
</form>
<P align=center><閱讀協議>
<!-- #include file="../include/end.htm" -->
</BODY>
</HTML>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -