开始前,讲解下标签对
的使用方式,转链接:【HTML】什么是 HTML 中的 div 标签
1. 案例的模块划分及其结构
配套代码,免费下载
2. 案例的登录和注册功能设计实现
<html>
<head>
<title>通信资费管理系统</title>
<meta http-equiv = "Content-Type" content = "text/html;charset = UTF-8">
</head>
<body background = "picture/login.jpg">
<br><br><br><br>
<br><br><br><br>
<form action = "frame/main.html" method = "post">
<table border = "2" align = "center" valign = "middle" width = "300">
<tr>
<td width = "34%" height = "50">用户账号:</td>
<td width = "64%" height = "50">
<input type = "text" name = "userName" value = "请输入账号">
</td>
</tr>
<tr>
<td width = "34%" height = "50">用户密码:</td>
<td width = "64%" height = "50">
<input type = "password" name = "userPassword" value = "********">
</td>
</tr>
<tr>
<td align = "center" width = "34%" height = "50">
<input type = "submit" value = "登录">
</td>
<td align = "center" width = "34%" height = "50">
<input type = "reset" value = "清除">
</td>
</tr>
<tr>
<td colspan = "2" align = "center" bgcolor = "#95BDFF" height = "50">
通信改变生活!
</td>
</tr>
<tr>
<td colspan = "2" align = "center" bgcolor = "#95BDFF" height = "50">
<a href = "register.html">注册</a>
</td>
</tr>
</table>
</form>
</body>
</html>
<html>
<head>
<title>通信资费管理系统注册页面</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body bgcolor = "CCCFFF">
<form action = "login.html" method = "post">
<br><br><br><br><br><br>
<table border = "2" align = "center" valign = "middle" width = "350">
<tr>
<td colspan = "2">
<h3 align = "center">请注册</h3>
</td>
</tr>
<tr>
<td width = "29%" align = "right">用户名:</td>
<td width = "69%">
<input type = "text" name = "userName">
</td>
</tr>
<tr>
<td width = "29%" align = "right">密码:</td>
<td width = "69%">
<input type = "password" name = "userPassword" size = "22"/>
</td>
</tr>
<tr>
<td width = "29%" align = "right">确认密码:</td>
<td width = "69%">
<input type = "password" name = "userPassword1">
</td>
</tr>
<tr>
<td width = "29%" align = "right">个人爱好:</td>
<td width = "69%">
<input type = "checkbox" name = "checkbox1"/>篮球
<input type = "checkbox" name = "checkbox2"/>足球
<input type = "checkbox" name = "checkbox3"/>排球
</td>
</tr>
<tr>
<td width = "29%" align = "right">职业:</td>
<td width = "69%">
<select name = "select" size = "1">
<option value = "Java">Java工程师</option>
<option value = "公务员">公务员</option>
<option value = "学生">学生</option>
<option value = "其他">其他</option>
</select>
</td>
</tr>
<tr>
<td width = "29%" align = "right">性别:</td>
<td width = "69%">
<input type = "radio" name = "radiobutton"/>男
<input type = "radio" name = "radiobutton"/>女
</td>
</tr>
<tr>
<td width = "29%" align = "right">电子邮箱:</td>
<td width = "69%">
<input type = "text" name = "email"/>
</td>
</tr>
<tr>
<td width = "29%" align = "right">出生年月:</td>
<td width = "69%">
<select name = "select1" size = "1">
<option value = "1970">1970</option>
<option value = "1971">1971</option>
<option value = "1972">1972</option>
<option value = "1973">1973</option>
<option value = "1974">1974</option>
<option value = "1975">1975</option>
<option value = "1976">1976</option>
<option value = "1977">1977</option>
<option value = "1978">1978</option>
<option value = "1979">1979</option>
<option value = "1980">1980</option>
<option value = "1981">1981</option>
<option value = "1982">1982</option>
<option value = "1983">1983</option>
<option value = "1984">1984</option>
<option value = "1985">1985</option>
<option value = "1986">1986</option>
<option value = "1987">1987</option>
<option value = "1988">1988</option>
<option value = "1989">1989</option>
<option value = "1990">1990</option>
<option value = "1991">1991</option>
<option value = "1992">1992</option>
<option value = "1993">1993</option>
<option value = "1994">1994</option>
<option value = "1995">1995</option>
<option value = "1996">1996</option>
<option value = "1997">1997</option>
<option value = "1998">1998</option>
<option value = "1999">1999</option>
<option value = "2000">2000</option>
<option value = "2001">2001</option>
<option value = "2002">2002</option>
<option value = "2003">2003</option>
<option value = "2004">2004</option>
<option value = "2005">2005</option>
<option value = "2006">2006</option>
<option value = "2007">2007</option>
<option value = "2008">2008</option>
</select>年
<select name = "select2" size = "1">
<option value = "1">1</option>
<option value = "2">2</option>
<option value = "3">3</option>
<option value = "4">4</option>
<option value = "5">5</option>
<option value = "6">6</option>
<option value = "7">7</option>
<option value = "8">8</option>
<option value = "9">9</option>
<option value = "10">10</option>
<option value = "11">11</option>
<option value = "12">12</option>
</select>月
<select value = "select3" size = "1">
<option value = "1">1</option>
<option value = "2">2</option>
<option value = "3">3</option>
<option value = "4">4</option>
<option value = "5">5</option>
<option value = "6">6</option>
<option value = "7">7</option>
<option value = "8">8</option>
<option value = "9">9</option>
<option value = "10">10</option>
<option value = "11">11</option>
<option value = "12">12</option>
<option value = "13">13</option>
<option value = "14">14</option>
<option value = "15">15</option>
<option value = "16">16</option>
<option value = "17">17</option>
<option value = "18">18</option>
<option value = "19">19</option>
<option value = "20">20</option>
<option value = "21">21</option>
<option value = "22">22</option>
<option value = "23">23</option>
<option value = "24">24</option>
<option value = "25">25</option>
<option value = "26">26</option>
<option value = "27">27</option>
<option value = "28">28</option>
<option value = "29">29</option>
<option value = "30">30</option>
<option value = "31">31</option>
</select>日
</td>
</tr>
<tr>
<td width = "29%" align = "right">所在地:</td>
<td width = "69%">
<select name = "select4" size = "1">
<option value = "1" selected>北京</option>
<option value = "2">天津</option>
<option value = "3">河北</option>
<option value = "4">上海</option>
<option value = "5">河南</option>
<option value = "6">吉林</option>
<option value = "7">黑龙江</option>
<option value = "8">内蒙古</option>
<option value = "9">山东</option>
<option value = "10">山西</option>
<option value = "11">陕西</option>
<option value = "12">甘肃</option>
<option value = "13">宁夏</option>
<option value = "14">青海</option>
<option value = "15">新疆</option>
<option value = "16">辽宁</option>
<option value = "17">江苏</option>
<option value = "18">浙江</option>
<option value = "19">安徽</option>
<option value = "20">广东</option>
<option value = "21">海南</option>
<option value = "22">广西</option>
<option value = "23">云南</option>
<option value = "24">贵州</option>
<option value = "25">四川</option>
<option value = "26">重庆</option>
<option value = "27">西藏</option>
<option value = "28">香港</option>
<option value = "29">澳门</option>
<option value = "30">福建</option>
<option value = "31">江西</option>
<option value = "32">湖南</option>
<option value = "33">湖北</option>
<option value = "34">台湾</option>
<option value = "35">其他</option>
</select>省
</td>
</tr>
<tr>
<td width = "50%" align = "center">
<input type = "submit" value = "提交">
</td>
<td width = "50%" align = "center">
<input type = "reset" value = "重置">
</td>
</tr>
</table>
</form>
</body>
</html>
<html>
<head>
<title>通信资费管理系统</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<frameset rows = "110,*">
<frame src = "../frame/top.html" name = "top" scrolling = "no">
<frameset rows = "50,*">
<frame src = "../frame/center.html" name = "center" scrolling = "no">
<frame src = "../frame/bottom.html" name = "bottom">
</frameset>
</frameset>
</html>
<html>
<head>
<title></title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body style="background-image:url(../picture/top.jpg);background-repeat: repeat-x" >
<br>
<h1 align = "center">欢迎使用通信资费管理系统</h1>
</body>
</html>
<html>
<head>
<title></title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body bgcolor = "#95BDFF">
<div align = "center">
<table border = "1" width = "95%">
<tr>
<th>
<a href = "../userManage.html/listUser.html" target = "bottom">
用户管理
</a>
</th>
<th>
<a href = "../pricingManage.html/listPricing.html" target = "bottom">
资费管理
</a>
</th>
<th>
<a href = "../reckonManage.html/listerBilling.html" target = "bottom">
账单管理
</a>
</th>
<th>
<a href = "../accountManage.html/listerAccount.html" target = "bottom">
财务管理
</a>
</th>
<th>
<a href = "../adminManage.html/listManager.html" target = "bottom">
管理员管理
</a>
</th>
<th>
<a href = "../userSelf.html/userServer.html" target = "bottom">
用户自服务
</a>
</th>
<th><a href = "../login.html" target = "_parent">退出系统</a></th>
</tr>
</table>
</div>
</body>
</html>
<html>
<head>
<title></title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body bgcolor = "CCCFFF">
<center>
<br><br><br><br><br><br>
<img src = "../picture/bottom.jpg" height = "300" width = "500">
<br><br><br><br><br><br>
<p></p>
</center>
</body>
</html>
4. 案例的用户管理模块设计与实现
<html>
<head>
<title>用户管理</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body bgcolor = "#CCDDEE">
<div align = "center">
<form action = "" name = "form1" mehod = "post">
<table border = "0" width = "91%" align = "center">
<tr bgcolor = "#CCDDEE">
<td width = "23%" height = "10" align = "center">
<a href = "open.html" target = "bottom" >开通账户</a>
</td>
<td width = "23%" align = "center">用户列表</td>
<td width = "54%">
<div align = "center">
<font color = "#000000">财务账号</font>
<input type = "text" name = "textfield2" size = "16">
<input type = "submit" value = "查询">
</div>
</td>
</tr>
</table>
</form>
<form action = "listUser.html" method = "post" name = "userform">
<div align = "center">
<br>
<table width = "91%" border = "1" align = "center" cellpadding = "0" cellspacing = "0" bgcolor = "CCDDEE">
<tr align = "center">
<td width = "55" height = "30">
<div align = "center">状态</div>
</td>
<td width = "67">
<div align = "center">财务账号</div>
</td>
<td width = "73">
<div align = "center">姓名</div>
</td>
<td width = "101">
<div align = "center">电话</div>
</td>
<td width = "138">
<div align = "center">邮箱</div>
</td>
<td width = "96">
<div align = "center">开户日期</div>
</td>
</tr>
<tr align = "center">
<td height = "15">正常</td>
<td>201300100</td>
<td>张三</td>
<td>010-66551100</td>
<td>zhangsan@163.com</td>
<td>2013年1月2日</td>
</tr>
<tr align = "center">
<td height = "15">正常</td>
<td>202300100</td>
<td>李四</td>
<td>010-66591170</td>
<td>lisi@163.com</td>
<td>2013年11月22日</td>
</tr>
</table>
</div>
</form>
</div>
</body>
</html>
<html>
<head>
<title>用户管理</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<form action = "" name = "form1" method = "post">
<table border = "0" width = "91%" align = "center">
<tr bgcolor = "#CCDDEE">
<td width = "23%" align = "center">开通账户</td>
<td width = "23%" height = "10" align = "center">
<a href = "listUser.html" target = "bottom" >用户列表</a>
</td>
<td width = "54%">
<div align = "center">
<font color = "#000000">财务账号</font>
<input type = "text" name = "textfield2" size = "16">
<input type = "submit" value = "查询">
</div>
</td>
</tr>
</table>
</form>
<p align = "left"> </p>
<center>
<h1>请输入用户的基本信息(带*的必须填写)</h1>
</center>
<form action = "listUser.html" method = "post">
<table width = "91%" border = "1" bgcolor = "#CCDDEE" align = "center">
<tr>
<td align = "right" width = "20%">财务账号*</td>
<td align = "left" width = "79%">
<input type = "text" name = "loginName">请输入用户的财务账号名称(只允许用英文、数字、下划线、区分大小写)
</td>
</tr>
<tr>
<td align = "right" width = "20%">财务密码*</td>
<td align = "left" width = "79%">
<input type = "password" name = "loginPassword">请输入用户的财务账号密码(长度为6~8位)
</td>
</tr>
<tr>
<td align = "right" width = "20%">重复密码*</td>
<td align = "left" width = "79%">
<input type = "password" name = "loginPassword2">请重新输入以上密码
</td>
</tr>
<tr>
<td align = "right" width = "20%">用户名称*</td>
<td align = "left" width = "79%">
<input type = "text" name = "userName">请输入用户真实姓名
</td>
</tr>
<tr>
<td align = "right" width = "20%">性别选项*</td>
<td align = "left" width = "79%">
<input type = "radio" name = "sex" value = "男" checked>男
<input type = "radio" name = "sex" value = "女">女
</td>
</tr>
<tr>
<td align = "right" width = "20%">付款方式*</td>
<td>
<select name = "moneyStyle">
<option value = "0">现金支付</option>
<option value = "1">银行转账</option>
<option value = "2">邮局付款</option>
<option value = "3">其他</option>
</select>
</td>
</tr>
<tr>
<td align = "right" width = "20%">用户状态*</td>
<td>
<input type = "radio" name = "userStatus" value = "1">开通
<input type = "radio" name = "userStatus" value = "2">暂停
</td>
</tr>
<tr>
<td align = "right">电子邮箱*</td>
<td>
<input type = "text" name = "userEmail">请输入正确的电子邮箱信息,以便我们能及时联系你
</td>
</tr>
<tr>
<td>
<p align = "center">
以下是选填信息(请尽量填写)
</p>
</td>
</tr>
<tr>
<td align = "right">省份   </td>
<td>
<select name = "nationality">
<option value = "1" selected>北京</option>
<option value = "2">天津</option>
<option value = "3">河北</option>
<option value = "4">上海</option>
<option value = "5">河南</option>
<option value = "6">吉林</option>
<option value = "7">黑龙江</option>
<option value = "8">内蒙古</option>
<option value = "9">山东</option>
<option value = "10">山西</option>
<option value = "11">陕西</option>
<option value = "12">甘肃</option>
<option value = "13">宁夏</option>
<option value = "14">青海</option>
<option value = "15">新疆</option>
<option value = "16">辽宁</option>
<option value = "17">江苏</option>
<option value = "18">浙江</option>
<option value = "19">安徽</option>
<option value = "20">广东</option>
<option value = "21">海南</option>
<option value = "22">广西</option>
<option value = "23">云南</option>
<option value = "24">贵州</option>
<option value = "25">四川</option>
<option value = "26">重庆</option>
<option value = "27">西藏</option>
<option value = "28">香港</option>
<option value = "29">澳门</option>
<option value = "30">福建</option>
<option value = "31">江西</option>
<option value = "32">湖南</option>
<option value = "33">湖北</option>
<option value = "34">台湾</option>
<option value = "35">其他</option>
</select>
</td>
</tr>
<tr>
<td align = "right">职业</td>
<td>
<select name = "zy">
<option value = "1" checked>Java工程师</option>
<option value = "2">公务员</option>
<option value = "3">学生</option>
<option value = "4">其他</option>
</select>
</td>
</tr>
<tr>
<td align = "right">职业</td>
<td>
<select name = "zy">
<option value = "1" checked>Java工程师</option>
<option value = "2">公务员</option>
<option value = "3">学生</option>
<option value = "4">其他</option>
</select>
</td>
</tr>
<tr>
<td align = "right">联系电话</td>
<td>
<input type = "text" name = "userPhone">请连续输入用户电话
</td>
</tr>
<tr>
<td align = "right">公司</td>
<td>
<input type = "text" name = "company">请输入用户所在单位信息
</td>
</tr>
<tr>
<td align = "right">公司邮箱</td>
<td>
<input type = "text" name = "mailAddress">请输入用户所在单位邮箱号码
</td>
</tr>
<tr>
<td align = "right">邮政编码</td>
<td>
<input type = "text" name = "postCode">请输入用户邮政编码
</td>
</tr>
<tr>
<td></td>
<td align = "right"> </td>
</tr>
</table>
<p align = "center">
<input type = "submit" value = "提交">
<input type = "reset" value = "重设">
</p>
</form>
</html>
看完觉得有帮助就顺手点个赞呗 ^_^!!!
出于一些原因,后面代码没有继续实现
参考数据:马军霞、张志峰等编著的《JSP程序设计实训与案例教程》