⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 addorder1.jsp

📁 仓库管理系统
💻 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 + -