?? chatreg.jsp
字號:
<HTML>
<HEAD>
<%@ page session="true" %>
<%@ page contentType="text/html;charset=gb2312" %>
<script language="javascript">
function validate_form() {
validity = true;
if (!check_empty(document.regForm.username.value))
{
validity = false; alert('對不起 ! 名字長度必須是(3--8) !');
}
else if((document.regForm.password.value.length==0)&&( document.regForm.cofpassword.value.length==0))
{
validity = false; alert('對不起 !請輸入密碼 !');
}
else if(!passwordcof(document.regForm.password.value ,document.regForm.cofpassword.value))
{
validity = false; alert('對不起 ! 兩次輸入的密碼不一樣 !');
}
else if (!check_email(document.regForm.useremail.value))
{
validity = false; alert('對不起 !請重新正確填入Email地址 !');
}
return validity;
}
function passwordcof(text1 ,text2)
{
return(text1==text2);
}
function check_empty(text) {
return ( (text.length>1) &&(text.length<9) );
}
function check_email(address) {
if ((address == "")
|| (address.indexOf ('@') == -1)
|| (address.indexOf ('.') == -1))
return false;
return true;
}
</script>
<TITLE>
register
</TITLE>
</HEAD>
<body bgcolor="ffffcc" >
<form name="regForm" method="post" action="chatregcof.jsp" onSubmit="return validate_form()">
<p> </p>
<p> </p>
<table width="66%" border="0" cellpadding="5" align="center" >
<tr>
<td width="23%" height="26"> </td>
<td width="77%" height="26"> 標記<font color="#FF0033">**</font>為必填項</td>
</tr>
<tr>
<td width="23%" height="26"><font color="#FF3300">**</font>申請帳號:</td>
<td width="77%" height="26">
<input type="text" name="username">
[長度只能是2-8之間] </td>
</tr>
<tr>
<td width="23%" height="37"><font color="#FF0000">**</font>密碼:</td>
<td width="77%" height="37">
<input type="password" name="password">
</td>
</tr>
<tr>
<td width="23%" height="8"><font color="#FF0033">**</font>確認密碼:</td>
<td width="77%" height="8">
<input type="password" name="cofpassword">
</td>
</tr>
<tr>
<td width="23%"><font color="#FF0000">**</font>email:</td>
<td width="77%">
<input type="text" name="useremail">[樣式:xuetaomei@263.net]
</td>
</tr>
<tr>
<td width="23%" height="38">主頁地址:</td>
<td width="77%" height="38">
<input type="text" name="homepage" value="http://">
</td>
</tr>
<tr>
<td width="23%" height="38"> </td>
<td width="77%" height="38">
<input type="submit" name="Submit" value="填好了">
<input type="reset" name="Submit2" value="填錯了!">
</td>
</tr>
</table>
</form>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -