六,本設計Servlet&Jsp代碼實現過程javascript
用一句話歸納,用戶在客戶端請求jsp頁面,jsp頁面將結果提交到Servlet,由Servlet負責處理結果,訪問數據庫等操做,並將參數結果放在request,session,application等元素中,而後經過請求轉發和重定向轉發到其餘jsp頁面或者Servletcss
6.1進入主頁和查看書籍詳細信息功能html
客戶經過客戶端請求地址http://localhost:8080/ShoppingCart/frame.jsp,請求主頁面,主頁面採用框架標籤frameset,框架中頁面再轉發請求Http://localhost:8080/ShoppingCart/PageQueryServlet, 返回的books.jsp頁面前端
frame.Jsp的代碼
java
- <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
-
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
- <html>
- <head>
- <title>喵喵網上書店</title>
- </head>
-
- <frameset cols="25%,75%" frameborder="NO" border="0" framespacing="0">
- <frame src="login.jsp" noresize scrolling="no" name="leftframe">
- <frame src="Http://localhost:8080/ShoppingCart/PageQueryServlet" name="rightframe" noresize scrolling="yes">
- </frameset>
- </html>
PageQueryServlet.Java的Servlet是分頁顯示書籍的代碼mysql
- package com.servlets;
-
- import java.io.IOException;
- import java.io.PrintWriter;
- import java.util.List;
-
- import javax.servlet.ServletException;
- import javax.servlet.http.HttpServlet;
- import javax.servlet.http.HttpServletRequest;
- import javax.servlet.http.HttpServletResponse;
- import com.Dao.PageQueryDao;
- import com.beans.Book;
-
- public class PageQueryServlet extends HttpServlet {
-
- public void doGet(HttpServletRequest request, HttpServletResponse response)
- throws ServletException, IOException {
- int currpage=1;
- if(request.getParameter("page")!=null){
- currpage=Integer.parseInt(request.getParameter("page"));
- }
-
- PageQueryDao pagedao=new PageQueryDao();
- List<Book> list=pagedao.getPageList(currpage);
- request.setAttribute("list", list);
- int pages;
- int count=pagedao.FindCounts();
- if(count%Book.PAGE_SIZE==0){
- pages=count/Book.PAGE_SIZE;
- }
- else{
- pages=count/Book.PAGE_SIZE+1;
- }
-
- StringBuffer sb=new StringBuffer();
-
- for(int i=1;i<=pages;i++){
- if(i==currpage){
- sb.append("『" + i + "』");
- }
- else{
- sb.append("<a href='PageQueryServlet?page="+i+"'>"+i+"</a>");
- }
- sb.append(" ");
- }
- request.setAttribute("bar", sb.toString());
- request.getRequestDispatcher("books.jsp").forward(request, response);
- }
- protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
- doGet(request, response);
- }
-
- }
Books.jsp是顯示書籍web
- <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
- <%@page import="java.util.List"%>
- <%@page import="com.beans.Book"%><html>
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
- <html>
- <head>
- <title>圖書信息列表</title>
-
-
-
-
- <style type="text/css">
- a:link{color:#FF4500;text-decoration:none}/*未訪問,紅色,無下劃線*/
- a:active{color:blue;}/*激活,紅色*/
- a:visited{color:red;text-decoration:none}/*已訪問,紫色,無下劃線*/
- a:hover{color:yellow;text-decoration:underline}/*鼠標移動上面,藍色,下劃線*/
- </style>
- </head>
-
- <body bgcolor="#98FB98" >
- <br><br>
- <table align="center" width="900">
- <tr>
- <td align="center" colspan="6" valign="baseline">
- <h2 style=" font-family:隸書;color:#0A0A0A;font-size:50px">喵喵網上書店</h2>
- </td>
- </tr>
- <%! int i=1,j=1; %>
- <% List<Book> list=(List<Book>)request.getAttribute("list");%>
- <% for(j=1;j<=2;j++){ %>
- <tr >
- <%
- for(Book b:list){
- if(j==2){
- if(b.getBookId()<=3||(b.getBookId()>=7&&b.getBookId()<=9)) continue;
- }
- %>
- <td width="100" height="140"><img src="images/<%=String.valueOf(b.getBookId()-1) %>.jpg"/></td>
- <td width="160">
- <font color="#0000FF" face="隸書">ISDN :<%=b.getBookId() %></font><br>
- <font color="#0000FF" face="隸書"> 書 名:<%=b.getName() %></font><br>
- <font color="#0000FF" face="隸書"> 做 者:<%=b.getAuthor() %></font><br>
- <font color="#0000FF" face="隸書">出 版:<%=b.getPublisher() %></font><br>
- <font color="#0000FF" face="隸書">價 格:<%=b.getPrice() %> </font><br>
- <a href="BookInfo/<%=b.getBookId()%>.jsp?bookid=<%=b.getBookId()%>">查看詳細信息</a>
- </td>
- <% if(b.getBookId()%3==0) break; %>
- <%} %>
- </tr>
- <%} %>
- <tr>
- <td align="right" colspan="6"><%= request.getAttribute("bar") %></td>
- </tr>
- </table>
- </body>
- </html>
結果圖:
點擊「查看詳細信息」會把該書的bookId放入request中,而後跳轉到相應的書的詳細信息頁:ajax
Id=1的書的代碼,1.jspsql
- <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
- <%@ page import="com.Dao.BookDao" %>
- <%@ page import="com.beans.Book" %>
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
- <html>
- <head>
- <title>三國演義</title>
-
-
-
- <style type="text/css">
- a:link{color:blue;text-decoration:none}/*未訪問,紅色,無下劃線*/
- a:active{color:blue;}/*激活,紅色*/
- a:visited{color:yellow;text-decoration:none}/*已訪問,紫色,無下劃線*/
- a:hover{color:blue;text-decoration:underline}/*鼠標移動上面,藍色,下劃線*/
- </style>
-
- </head>
- <body bgcolor="#98FB98" >
- <% int bookid=Integer.parseInt(request.getParameter("bookid"));
- BookDao bookdao=new BookDao();
- Book b=bookdao.getBookById(bookid);
- String msg=(String)request.getAttribute("msg");
- %>
-
- <br><br><br><br>
- <form action="http://localhost:8080/ShoppingCart/CheckLogin?bookid=<%=b.getBookId() %>" method="post" name="checkform">
- <table align="center" width="800">
- <tr>
- <td width="100" height="140"><img src="Http://localhost:8080/ShoppingCart/images/<%=String.valueOf(b.getBookId()-1) %>.jpg"/></td>
- <td >
- <font color="#000000" face="隸書" size="4">ISDN :<%=b.getBookId() %></font><br>
- <font color="#000000" face="隸書" size="4"> 書 名:<%=b.getName() %></font><br>
- <font color="#000000" face="隸書" size="4"> 做 者:<%=b.getAuthor() %></font><br>
- <font color="#000000" face="隸書" size="4">出 版:<%=b.getPublisher() %></font><br>
- <font color="#000000" face="隸書" size="4">價 格:<%=b.getPrice() %> </font><br>
- </td>
- </tr>
- <tr><td colspan="2"> <hr color="#FF0000"></td></tr>
-
- <tr>
- <td colspan="2"> <h2><font color="#8B0000" face="隸書">簡介:</font></h2></td>
- </tr>
-
- <tr>
- <td colspan="2">
- <p style="font-family:'楷體'"> 《三國演義》是中國第一部長篇章回體歷史演義小說,以描寫東漢末年的戰爭爲主,反映了魏、蜀、吳三個政治集團之間的政治和軍事鬥爭。分爲黃巾之亂、董卓之亂、三國鼎立三大部分。在廣闊的背景上,上演了一幕幕氣勢磅礴的戰爭場面。</p>
- <p style="font-family:'楷體'"> 羅貫中將兵法三十六計融於字裏行間,既有情節,也有兵法韜略。本書反映了豐富的歷史內容,人物名稱、地理名稱、主要事件和人物性格與《三國志》基本相同,是在固定形象基礎上,進行再發揮,這也是歷史演義小說的套路。本書一方面反映了真實的三國曆史,照顧到讀者但願瞭解真實歷史的須要;另外一方面,根據明朝社會的實際狀況對三國人物進行了誇張、美化、醜化等等。</p></td>
- </tr>
-
- <tr>
- <td colspan="2" align="right">
- <input value="加入購物車" type="submit"> <a href="Http://localhost:8080/ShoppingCart/PageQueryServlet">繼續購物</a></td>
- </tr>
- </table>
- </form>
- <% if(msg!=null){ %>
- <%=msg %>
- <%} %>
- </body>
- </html>
結果圖:
在該頁面中點擊「加入購物車」,請求會提交到CheckLogin的Servlet,在該Servlet中完成檢查用戶有無登陸的操做和將書加入到該用戶的購物車的操做。若是用戶爲登陸會「用戶爲登陸」窗口提示信息,若是登陸了,就成功加入了該用戶的購物車,感受淘寶的模式有點像,點擊該用戶的「查看個人購物車」便可看到剛加的書籍。若購物車中有書籍會提示「此書已加入購物車,請勿重複添加!」,只需在購物車中調整購買數量便可。數據庫
CheckLogin.java
- package com.servlets;
-
- import java.io.IOException;
- import java.io.PrintWriter;
-
- import javax.servlet.ServletException;
- import javax.servlet.http.HttpServlet;
- import javax.servlet.http.HttpServletRequest;
- import javax.servlet.http.HttpServletResponse;
- import javax.servlet.http.HttpSession;
-
- import com.Dao.BookDao;
- import com.Dao.CartDao;
- import com.beans.Book;
-
- public class CheckLogin extends HttpServlet {
- public void doPost(HttpServletRequest request, HttpServletResponse response)
- throws ServletException, IOException {
- response.setCharacterEncoding("gb2312");
- HttpSession session=request.getSession();
-
-
- System.out.println("加入購物車");
- String bookid=request.getParameter("bookid");
- BookDao bookdao=new BookDao();
- Book b=bookdao.getBookById(Integer.parseInt(bookid));
-
- System.out.println("以獲取用戶");
- if( session.getAttribute("userid")==null){
- System.out.println("用戶未空");
- request.setAttribute("msg", "<script language='javascript'>window.alert('用戶未登陸!');</script>");
- request.getRequestDispatcher("BookInfo/"+b.getBookId()+".jsp").forward(request, response);
- }
- else{
-
- CartDao cartdao=new CartDao();
- String userid=(String)session.getAttribute("userid");
-
-
- boolean cc=cartdao.isContainBook(userid, bookid);
- if(cc){
- request.setAttribute("msg", "<script language='javascript'>window.alert('此書已加入購物車,請勿重複添加!');</script>");
- request.getRequestDispatcher("BookInfo/"+b.getBookId()+".jsp").forward(request, response);
- }else{
-
- boolean bb=cartdao.InsertBook((String)session.getAttribute("userid"), b);
- if(bb){
-
-
-
-
- request.setAttribute("msg", "<script language='javascript'>window.alert('成功加入購物車!');</script>");
- request.getRequestDispatcher("BookInfo/"+b.getBookId()+".jsp").forward(request, response);
- }
- else{
- request.setAttribute("msg", "<script language='javascript'>window.alert('加入購物車失敗!');</script>");
- request.getRequestDispatcher("BookInfo/"+b.getBookId()+".jsp").forward(request, response);
- }
-
- }
- }
- }
-
- }
6.2用戶註冊和用戶登陸功能
在用戶登陸使用以前用戶首先要註冊,註冊過程我採用的是爲每一個用戶新建一張表,這張表就表明了該用戶的購物車,存放的是該用戶選購的書籍
Register.jsp是顯示註冊的代碼
結果圖:
該註冊頁面點擊「取消」會返回顯示書籍的主頁面,點擊「註冊」請求提交到RegServlet,註冊成功以後會彈出一個註冊成功提示框而且數據庫會生成以帳號爲表名的表:
RegServlet.java
- package com.servlets;
-
- import java.io.IOException;
- import java.io.PrintWriter;
- import java.sql.Connection;
- import java.sql.PreparedStatement;
- import java.sql.SQLException;
-
- import javax.servlet.ServletException;
- import javax.servlet.http.HttpServlet;
- import javax.servlet.http.HttpServletRequest;
- import javax.servlet.http.HttpServletResponse;
-
- import com.Dao.UserDao;
- import com.tools.DBConnection;
-
- public class RegServlet extends HttpServlet {
-
-
- private static final long serialVersionUID = 1L;
-
- public void doPost(HttpServletRequest request, HttpServletResponse response)
- throws ServletException, IOException {
- request.setCharacterEncoding("UTF-8");
- response.setCharacterEncoding("UTF-8");
- response.setContentType("text/html");
-
- String id= request.getParameter("ID");
- String password=request.getParameter("Password");
- String sex= request.getParameter("Sex");
- String phone=request.getParameter("Phone");
- String home=request.getParameter("Home");
- String email=request.getParameter("Email");
- String header=request.getParameter("Header");
-
- DBConnection DB=new DBConnection();
- Connection conn=null;
- conn=DB.getCon();
- if(conn!=null){
- try {
- UserDao dao=new UserDao();
- if(!dao.isContainUser(id)){
- String sql="insert into users values(?,?,?,?,?,?,?)";
- PreparedStatement pstm=conn.prepareStatement(sql);
- pstm.setString(1, id);
- pstm.setString(2, password);
- pstm.setString(3, sex);
- pstm.setString(4, phone);
- pstm.setString(5, home);
- pstm.setString(6, email);
- pstm.setString(7, header);
- pstm.executeUpdate();
- System.out.println("註冊成功!");
-
- String sql1="create table "+id+"(ID int(20),Name varchar(20),Price varchar(20),Num int(20),Total int(20),primary key(ID))";
- PreparedStatement pstm1=conn.prepareStatement(sql1);
- pstm1.executeUpdate();
- response.sendRedirect("Http://localhost:8080/ShoppingCart/PageQueryServlet");//登陸成功後重定向到books界面
- }
- else{
- PrintWriter out=response.getWriter();
- out.print("<script language='javascript'>window.alert('註冊失敗!');</script>");
- out.flush();
- out.close();
- System.out.println("用戶已存在!");
- }
-
-
- } catch (SQLException e) {
-
- e.printStackTrace();
- }
-
- }
- }
- }
Bug分析:
原本想搞個上傳頭像的功能,可是感受圖片規格大小之類的技術不太會,只想出了使用剪輯好了的圖片做爲備選項,想實現選中了某個頭像就更換顯示對應的頭像,這涉及了web前端的JavaScript知識,我只懂一點點,因此就沒有修改了……
用戶登陸功能:
Login.jsp
該頁面有三部分,登陸框,公告信息,友情連接。
登陸框很簡單form提交到LoginServlet就能夠了,在LoginServlet中查詢數據庫判斷等操做:
LoginServlet.java
- package com.servlets;
-
- import java.io.IOException;
- import java.io.PrintWriter;
- import java.util.List;
-
- import javax.servlet.ServletException;
- import javax.servlet.http.HttpServlet;
- import javax.servlet.http.HttpServletRequest;
- import javax.servlet.http.HttpServletResponse;
- import javax.servlet.http.HttpSession;
-
- import com.Dao.BookDao;
- import com.Dao.UserDao;
- import com.beans.Book;
- import com.beans.User;
-
- public class LoginServlet extends HttpServlet {
-
- private static final long serialVersionUID = 1L;
- protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
- doPost(request, response);
- }
- public void doPost(HttpServletRequest request, HttpServletResponse response)
- throws ServletException, IOException {
- request.setCharacterEncoding("UTF-8");
- response.setCharacterEncoding("UTF-8");
- response.setContentType("text/html");
- System.out.println("接收數據");
- String id=request.getParameter("id");
- String password=request.getParameter("password");
- UserDao dao=new UserDao();
- BookDao bdao=new BookDao();
- User user=null;
- user=dao.getUser(id, password);
- HttpSession session=request.getSession();
-
- if(user!=null){
- System.out.println("用戶已查到");
- session.setAttribute("userid",user.getID());
- response.sendRedirect("loginsuccess.jsp");
- }
- else
- {
- PrintWriter out=response.getWriter();
- out.print("<script type='text/javascript'>");
- out.print("window.alert('用戶名或密碼不正確!');");
- out.print("</script>");
- out.flush();
- out.close();
- }
-
- }
-
- }
公告信息採用Ajax技術,不刷新頁面更新
關鍵代碼:
- <tr bgcolor="#FF0000">
- <td colspan="2" >
- 公告信息:
- </td>
- </tr>
- <tr >
- <td colspan="2" width="215" height="100">
- <marquee direction="up" scrollamount="3" onmouseout="this.start()" onmouseover="this.stop()">
- <div id="showInfo" ></div>
- </marquee>
- </td>
- </tr>
主要是javascript代碼
- <script type="text/javascript">
-
- function onerror(){
- alert("您的操做有誤!");
- }
-
- function getInfo(){
- var loader=new net.AjaxRequest("getInfo.jsp?nocache="+new Date().getTime(),deal_getInfo,onerror,"GET");
-
- }
-
- function deal_getInfo(){
- document.getElementById("showInfo").innerHTML=this.req.responseText;
- }
-
- window.onload=function(){
- getInfo();
- window.setInterval("getInfo()", 600000);
- }
- </script>
結果圖:
6.3查看購物車,商品結算和生成訂單功能
點擊「查看個人購物車」,表單提交到CartServlet,在此CartServlet中查詢該用戶的購物車表,查詢全部已添加到購物車的書籍,並請求轉發到Carts.jsp
CartServlet.java
- package com.servlets;
-
- import java.io.IOException;
- import java.io.PrintWriter;
- import java.util.List;
-
- import javax.servlet.ServletException;
- import javax.servlet.http.HttpServlet;
- import javax.servlet.http.HttpServletRequest;
- import javax.servlet.http.HttpServletResponse;
- import javax.servlet.http.HttpSession;
-
- import com.Dao.CartDao;
- import com.beans.CartBook;
-
- public class CartServlet extends HttpServlet {
-
- protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
- doPost(request, response);
- }
- public void doPost(HttpServletRequest request, HttpServletResponse response)
- throws ServletException, IOException {
- HttpSession session=request.getSession();
- String userId=(String) session.getAttribute("userid");
- System.out.println(userId);
-
- String m=request.getParameter("m");
- if(m!=null){
- if(m.equals("1")){
- request.setAttribute("msg", "<script language='javascript'>window.alert('成功刪除!');</script>");
- }
- else if(m.equals("0")){
- request.setAttribute("msg", "<script language='javascript'>window.alert('刪除失敗!');</script>");
- }
- else if(m.equals("2")){
- request.setAttribute("msg", "<script language='javascript'>window.alert('清空購物車失敗!');</script>");
- }
- }
-
- CartDao ccdao=new CartDao();
- List<CartBook> list=ccdao.getAllCartBooks((String)session.getAttribute("userid"));
- request.setAttribute("booklist", list);
- request.getRequestDispatcher("Carts.jsp").forward(request, response);
- }
-
- }
Carts.jsp
購物車結果圖:
在這個購物車頁面中會有比較多的功能,好比:刪除書籍,清空購物車,修改書籍數量,商品結算等功能
刪除書籍:
點擊「刪除」請求提交到DeleteBookServlet,該Servlet中實現刪除操做
DeleteBookServlet.java
- package com.servlets;
-
- import java.io.IOException;
- import java.io.PrintWriter;
-
- import javax.servlet.ServletException;
- import javax.servlet.http.HttpServlet;
- import javax.servlet.http.HttpServletRequest;
- import javax.servlet.http.HttpServletResponse;
- import javax.servlet.http.HttpSession;
-
- import com.Dao.CartDao;
-
- public class DeleteBookServlet extends HttpServlet {
-
- private static final long serialVersionUID = 1L;
- protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
- doPost(request, response);
- }
- public void doPost(HttpServletRequest request, HttpServletResponse response)
- throws ServletException, IOException {
- request.setCharacterEncoding("UTF-8");
- response.setCharacterEncoding("UTF-8");
- HttpSession session=request.getSession();
- String userid=(String)session.getAttribute("userid");
- String bookid=request.getParameter("bookid");
-
- CartDao cartdao=new CartDao();
- boolean b=cartdao.DeleteBook(userid, Integer.parseInt(bookid));
- if(b){
- System.out.println("刪除成功");
- response.sendRedirect("http://localhost:8080/ShoppingCart/CartServlet?m=1");
- }
- else{
-
- response.sendRedirect("http://localhost:8080/ShoppingCart/CartServlet?m=0");
- }
- }
-
- }
清空購物車:
點擊「清空購物車」,請求提交到ClearCartServlet
ClearCartServlet.java
- package com.servlets;
-
- import java.io.IOException;
- import java.io.PrintWriter;
-
- import javax.servlet.ServletException;
- import javax.servlet.http.HttpServlet;
- import javax.servlet.http.HttpServletRequest;
- import javax.servlet.http.HttpServletResponse;
- import javax.servlet.http.HttpSession;
-
- import com.Dao.CartDao;
-
- public class ClearCartServlet extends HttpServlet {
-
- protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
- doPost(request, response);
- }
- public void doPost(HttpServletRequest request, HttpServletResponse response)
- throws ServletException, IOException {
-
- HttpSession session=request.getSession();
- String userid=(String)session.getAttribute("userid");
-
- CartDao cd=new CartDao();
- boolean b=cd.ClearCartBook(userid);
- if(b){
- response.sendRedirect("http://localhost:8080/ShoppingCart/CartServlet");
- }
- else{
- response.sendRedirect("http://localhost:8080/ShoppingCart/CartServlet?m=2");
- }
- }
-
- }
修改書籍數量:點擊「+」/「-」操做,請求提交到UpdateNumServlet,修改數量以後總價格也會變化,修改完成以後重定向到本頁面
UpdateNumServlet.java
- package com.servlets;
-
- import java.io.IOException;
- import java.io.PrintWriter;
-
- import javax.servlet.ServletException;
- import javax.servlet.http.HttpServlet;
- import javax.servlet.http.HttpServletRequest;
- import javax.servlet.http.HttpServletResponse;
- import javax.servlet.http.HttpSession;
-
- import com.Dao.CartDao;
-
- public class UpdateNumServlet extends HttpServlet {
-
- private static final long serialVersionUID = 1L;
-
- public void doPost(HttpServletRequest request, HttpServletResponse response)
- throws ServletException, IOException {
- request.setCharacterEncoding("UTF-8");
- HttpSession session=request.getSession();
- String userid=(String)session.getAttribute("userid");
- int bookid=Integer.parseInt((String)request.getParameter("bookidtext"));
- String hid=(String)request.getParameter("hid");
- int dnum=Integer.parseInt(hid);
-
- CartDao cd=new CartDao();
- cd.ModifyNum(userid, bookid, dnum);
- System.out.println("進入修改數目servlet");
- response.sendRedirect("http://localhost:8080/ShoppingCart/CartServlet");
- }
-
- }
商品結算:
點擊「商品結算」,請求提交到orders.jsp
- <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
-
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
- <html>
- <head>
- <title>填寫訂單</title>
-
-
-
- </head>
- <body bgcolor="#98FB98">
- <form action="OrderServlet" method="post">
- <br><br>
- <table align="center" width="900" >
- <tr>
- <td colspan="2" bgcolor="#FFC125"><b>填寫訂單信息:</b></td>
- </tr>
- <tr>
- <td colspan="2"><hr></td>
- </tr>
- <tr >
- <td colspan="2" bgcolor="#FFE4B5">收貨人信息</td>
- </tr>
- <tr>
- <td width="150">收 貨 人:</td>
- <td><input type="text" name="receiver"></td>
- </tr>
- <tr>
- <td width="150">詳細地址:</td>
- <td><input type="text" name="address" size="70"></td>
- </tr>
- <tr>
- <td width="150">郵政編碼:</td>
- <td><input type="text" name="post"></td>
- </tr>
- <tr>
- <td width="150">移動電話:</td>
- <td><input type="text" name="mobile"> 固定電話:<input type="text" name="fixphone">(如:027-12345678)</td>
- </tr>
- <tr bgcolor="#FFE4B5">
- <td colspan="2">送貨方式:</td>
- </tr>
- <tr>
- <td colspan="2" ><input type="radio" name="songhuoway" value="<b>普通快遞送貨上門 。</b>【運費5元】 ">普通快遞送貨上門
- 送貨時間:
- <select name="songhuotime" style="width:150px">
- <option value="--請選擇送貨時間--" >--請選擇送貨時間--</option>
- <option value="送貨時間:三天內." >三天內</option> &