1. 程式人生 > 其它 >【JavaWeb 實際專案 03】

【JavaWeb 實際專案 03】

第一階段:主要是通過jQuery對註冊頁面的使用者名稱+密碼+郵箱等作出的一些限制

第二階段: 實現使用者註冊和登入

第三階段:主要是優化註冊和登入,給使用者一些友好的資訊提示

步驟:

1、頁面jsp動態化

  • 在html頁面頂行新增page指令
  • 修改檔案字尾名為:.jsp
  • 使用IDEA搜尋替換.html為.jsp

2、抽取頁面中相同的內容

1)登入成功後的選單

<div>
    <span>歡迎<span class="um_span"></span>光臨塵封網書城</span>
    <a href="order/order.jsp"
>我的訂單</a> <a href="index.jsp">登出</a>&nbsp;&nbsp; <a href="index.jsp">返回</a> </div>

2)head中的css、jquery、base標籤

<base href="http://localhost:8080/book/">
<link type="text/css" rel="stylesheet" href="static/css/style.css" >
<script type="text/javascript"
src="static/script/jquery-1.7.2.js"></script>

3)每個頁面的頁尾

<div id="bottom">
            <span>
                塵封網.Copyright &copy;2013
            </span>
</div>

4)manager模組的選單

<div>
    <a href="book_manager.jsp">圖書管理</a>
    <a href="order_manager.jsp"
>訂單管理</a> <a href="index.jsp">返回商城</a> </div>