?? addorder1.jsp
字號:
<%@ page language="java" pageEncoding="gb2312"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>JSF 登錄界面</title>
<script language="JavaScript">
<!--
function addRow()
{
//取table
var elTable = document.getElementById("orderForm:orderItem");
//復制最后一行
var elNewRow = elTable.rows[elTable.rows.length-1].cloneNode(true);
//把新行的所有input中的內容清空
var rgelInput = elNewRow.getElementsByTagName("input");
for (var i=0;i<rgelInput.length;i++) rgelInput.value="";
elTable.rows[elTable.rows.length-1].parentNode.appendChild(elNewRow);
return false;
}
-->
</script>
</head>
<body>
<f:view>
<h:form id="orderForm">
<h:panelGrid columns="8" style="background-color: #0080FF">
<h:outputLabel for="number" value="訂單號:"></h:outputLabel>
<h:inputText id="number" value="#{orderBean.number}"></h:inputText>
<h:outputLabel for="customer" value="客戶:"></h:outputLabel>
<h:inputText id="customer" value="#{orderBean.customer}"></h:inputText>
<h:outputLabel for="bizDate" value="業務日期:"></h:outputLabel>
<h:inputText id="bizDate" value="#{orderBean.bizDate}">
<f:convertDateTime pattern="yyyy-MM-dd" />
</h:inputText>
<h:commandButton value="增加訂單項" onclick="return addRow()"></h:commandButton>
<h:commandButton value="保存訂單" action="#{orderBean.save}"></h:commandButton>
<h:messages layout="table"></h:messages>
</h:panelGrid>
<h:panelGrid border="1" columns="4" id="orderItem"
style="background-color: #C0C0C0">
<h:outputText value="物料"></h:outputText>
<h:outputText value="數量"></h:outputText>
<h:outputText value="單價" id="text3"></h:outputText>
<h:outputText value="金額" id="text4"></h:outputText>
<h:inputText id="name"></h:inputText>
<h:inputText id="qty"></h:inputText>
<h:inputText id="price"></h:inputText>
<h:inputText id="amt"></h:inputText>
</h:panelGrid>
</h:form>
</f:view>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -