?? leaseauto.jsp
字號:
<%@ page language="java" pageEncoding="utf-8"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles" %>
<%@ page import="java.util.*"%>
<%@ page import="java.text.*"%>
<%
String datetime=new SimpleDateFormat("yyyy-MM-dd").format(Calendar.getInstance().getTime()); //獲取系統時間
request.setAttribute("date",datetime);
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html:html lang="true">
<head>
<html:base />
<title>MyJsp.jsp</title>
</head>
<!-- 設計兩個表:
1. 車輛信息autos(id,category類別,model型號,no車牌號,price租車價格)
2. 租車信息leases(id,autoId車輛id,customer客戶名稱,leaseDate租車日期,returned是否還車?,returnDate還車日期)
-->
<body>
<p>
<html:form action="/lease.do" method="post" readonly="">
</p>
<%@ include file="head.jsp"%>
<table width="672" height="350" border="1" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="668" height="221" background="image/bank.jpg"><table width="377" height="90" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="373">待租車輛:
<html:select property="autoId">
<logic:iterate id="car" name="cars">
<bean:define id="car0" name="car" property="id"></bean:define>
<bean:define id="car1" name="car" property="category"></bean:define>
<bean:define id="car2" name="car" property="model"></bean:define>
<bean:define id="car3" name="car" property="no"></bean:define>
<bean:define id="car4" name="car" property="price"></bean:define>
<html:option value="${car0}">${car1};${car2};車牌:${car3};價格:${car4}</html:option>
</logic:iterate>
</html:select>
<html:errors property="customer_error"/>
<br>
<bean:define id="date" name="date"></bean:define>
租車日期:
<html:text property="leaseDate" value="${date}" readonly="true"></html:text>
<br>
租 車 人:
<html:text property="customer" maxlength="10"></html:text>
<html:errors property="customer_error"/>
<br>
<html:submit>提交</html:submit></td>
</tr>
</table></td>
</tr>
</table>
</html:form>
<p> </p>
</body>
<%@ include file="end.jsp"%>
</html:html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -