?? cars.jsp
字號:
<%@ page language="java" contentType="text/html; charset=utf-8"
pageEncoding="utf-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>網上商店</title>
</head>
<body>
歡迎進入網上商店:
<bean:write name="loginForm" property="username" />
<br>
<table border="1" cellspacing="1" cellpadding="1" align="center">
<logic:notEmpty name="carForm" property="carList" >
<logic:iterate indexId="index" id="item" name ="carForm" property="carList">
<tr>
<td class="allcapsCenter"><bean:write name="item" property="name" /></td>
<td class="allcapsCenter"><bean:write name="item" property="priceString" /></td>
<td><bean:write name="item" property="description" /></td>
<td nowrap class="center">
<a href="javascript:submitCar(document.fview, '<bean:write name="item" property="name" />')">查看</a>
<font class="redBold">||</font>
<a href="javascript:submitCar(document.fadd, '<bean:write name="item" property="name" />')">購買</a>
</td>
</tr>
</logic:iterate>
</logic:notEmpty>
</table>
<logic:notEmpty name="carForm" property="buyList" >
已購買的商品:
<table border="1" cellspacing="1" cellpadding="1" align="center">
<logic:iterate indexId="index" id="item" name ="carForm" property="buyList">
<tr>
<td class="allcapsCenter"><bean:write name="item" property="name" /></td>
<td class="allcapsCenter"><bean:write name="item" property="priceString" /></td>
</tr>
</logic:iterate>
</table>
</logic:notEmpty>
<html:form action="car.do?mode=view" method="post" styleId="fview">
<input type="hidden" id="hid" name="hid" />
</html:form>
<html:form action="car.do?mode=add" method="post" styleId="fadd">
<input type="hidden" id="hid" name="hid" />
</html:form>
<a href="javascript:window.location('car.do?mode=done')">確認</a>
<br>
<a href="javascript:window.location('login.jsp')">取消</a>
</body>
<script language="JavaScript">
<!--
function submitCar(form, hid) {
form.hid.value = hid;
form.submit();
}
// -->
</script>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -