[PHP典型模塊與項目實戰大全]-第六章(註冊和登錄模組:login.html)
[PHP典型模塊與項目實戰大全]-第六章(註冊和登錄模組:login.html)
code2html:http://tohtml.com/
login.html-登錄頁面
<html>
<head>
<metahttp-equiv="Content-Type"content="text/html; charset=utf-8">
<title>User Login</title>
<style type="text/css">
.alert {color: red}
.textinput {width:160px}
.btn {width:80px}
table {border: 3px double;background-color:#eeeeee;}
</style>
<scriptlanguage='javascript'src='check_data.js'></script>
<scriptlanguage="javascript">
<!--
function Check()
{
if(document.Login.username.value=="")
{
alert('請輸入你的用戶名!');
return false;
}
if(document.Login.pwd.value=="")
{
alert('請輸入你的密碼!');
return false;
}
if (document.Login.username.value.length<2)
{
window.alert('用戶名長度必須大於2!');
return false;
}
if (document.Login.pwd.value.length<6)
{
alert('密碼長度不足!');
return false;
}
}
-->
</script>
</head>
<body>
<formname="Login"method="post"action="login.php"onSubmit="return Check();">
<tableborder="0"cellpadding="8"width="350"align="center">
<tr>
<tr>
<tdcolspan="2"align="center"class="alert">用戶登錄界面</td>
</tr>
<td>用戶名:</td>
<td><inputname="username"type="text"id="username"class="textinput"/></td>
</tr>
<tr>
<td>密碼:</td>
<td><inputname="pwd"type="password"id="pwd"class="textinput"/></td>
</tr>
<tr>
<tdcolspan="2"align="center">
<inputtype="submit"class="btn"value="登錄">
<inputtype="reset"class="btn"value="重置">
</td>
</tr>
</table>
</form>
</body>
</html>
|