?? addgoods.jsp
字號:
<%@ page language="java" pageEncoding="gb2312"%>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html:html locale="true">
<head>
<html:base />
<title>addGoods.jsp</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"><style type="text/css">
<!--
body {
background-color: #CCCCCC;
}
.style1 {font-family: "宋體"}
.style3 {font-family: "宋體"; font-size: 14px; }
-->
</style>
<script type="text/javascript">
function check(){
var n=form2.checkbox.length;
var sel=false;
for(i=0;i<n;i++){
if(form2.checkbox[i].checked){
var val=form2.txt[i].value;
if(val==""||(val.match(/\D/)!=null)){
alert("定購數(shù)量必須為整數(shù)!");
return false;
}
sel=true;
}
}
if(sel){
return true;
}else{
alert("至少要選定一種藥品!");
return false;
}
}
</script>
</head>
<body>
<div align="center">
<h2 class="style1">添加藥品</h2>
</div>
<form name="form1" method="post" action="QueryGoods" >
<table width="450" border="0" align="center" cellspacing="0" class="style3">
<tr>
<td width="67">查詢方式</td>
<td width="130"><select name="select">
<option value="a">藥品名稱</option>
<option value="b">類別</option>
</select></td>
<td width="52">關鍵字</td>
<td width="84"><input name="keyword" type="text" size="12"></td>
<td width="107" align="center"><input type="submit" name="Submit" value="查詢"></td>
</tr>
</table>
</form>
<hr>
<form name="form2" method="post" action="AddGood" onSubmit="return check()" >
<table width="450" border="1" align="center" cellspacing="0" class="style3" >
<tr>
<td width="40">定購</td>
<td width="80">藥品名稱</td>
<td width="60">類別</td>
<td width="50">價格</td>
<td width="120">說明</td>
<td >定購數(shù)量</td>
</tr>
<logic:present name="list">
<logic:iterate id="good" name="list">
<tr>
<td align="center"><input type="checkbox" name="checkbox"
value="<bean:write name='good' property='id' />" >
</td>
<td><bean:write name="good" property="name" /></td>
<td><bean:write name="good" property="type" /></td>
<td><bean:write name="good" property="price" /></td>
<td><bean:write name="good" property="notes" /></td>
<td align="center"><input value="1" size=4 id="txt"
name="<bean:write name='good' property='id' />"
onkeydown="if(event.keyCode==13)event.keyCode=9" >
</td>
</tr>
</logic:iterate>
<tr height="50">
<td colspan=6 align="center" valign="middle">
<input type="submit" value="提交">
</td>
</tr>
</logic:present>
<logic:present name="noGoodsRecord">
<tr height="50">
<td colspan=6 align="center" valign="middle">查詢不到所需藥品!</td>
</tr>
</logic:present>
</table>
</form>
</body>
</html:html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -