?? freepirce.jsp
字號:
<%@ page contentType="text/html; charset=gb2312"%>
<%@page import="java.sql.*"%>
<%@page import="java.util.*"%>
<%@page import="com.domain.BigTypeForm"%>
<%@page import="com.domain.SmallTypeForm"%>
<%@page import="com.domain.GoodsForm"%>
<jsp:useBean id="big" scope="page" class="com.dao.BigTypeDao"/>
<jsp:useBean id="small" scope="page" class="com.dao.SmallTypeDao"/>
<%
GoodsForm goodsForm=(GoodsForm)request.getAttribute("form");
%>
<script language="javascript">
function checkEmpty(form){
for(i=0;i<form.length;i++){
if(form.elements[i].value==""){
alert("表單信息不能為空");
return false;
}
}
if(isNaN(document.form.free.value)){
window.alert("價格只能為數字");
return false;
}
if(document.form.free.value==document.form.now.value){
window.alert("您輸入特價商品的價格應該與原來的價格是等價的,請重新輸入!!!");
return false;
}
if(document.form.free.value-document.form.now.value>0){
window.alert("您輸入特價商品的價格應該比原來的價格高,請重新輸入!!!");
return false;
}
}
</script>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>電子商城的后臺</title>
</head>
<body>
<table width="755" height="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr valign="bottom">
<td height="116" colspan="2" background="image/banner1.jpg"> <div align="center">
<jsp:include page="../upTwo.jsp"/>
</div></td>
</tr>
<tr>
<td width="24%" height="318"><jsp:include page="../../leftManager.jsp"/> </td>
<td width="76%" height="318" bgcolor="#FFFFFF" class="linkBlack">
<div align="center">
<table width="99%" height="16" border="0" cellpadding="0" cellspacing="0">
<tr >
<td bgcolor="#E6E6E6" ><div align="center"><font color="#990000"><b>設置特價商品</b></font></div></td>
</tr>
</table><br><br>
<br><br> <form name="form" method="post" action="goodsAction.do?action=11&id=<%=goodsForm.getId()%>&mark=1" onSubmit="return checkEmpty(form)">
<table width="90%" height="233" border="1" cellpadding="0" cellspacing="0">
<tr>
<td width="20%" height="26"> 所屬大類別</td>
<td width="31%"> <%=big.selectName(goodsForm.getBig())%></td>
<td width="20%"> 所屬于小類別</td>
<td width="31%"> <%=small.selectName(goodsForm.getSmall())%></td>
</tr>
<tr>
<td height="26"> 商品名稱</td>
<td> <%=goodsForm.getName()%></td>
<td> 生產廠商</td>
<td> <%=goodsForm.getFrom()%></td>
</tr>
<tr>
<td height="26"> 商品定價</td>
<td> <input name="now" type="hidden" value="<%=goodsForm.getNowPrice()%>"><%=goodsForm.getNowPrice()%>元</td>
<td> 是否特價</td>
<td> <%if(goodsForm.getMark().toString().equals("0")){%>否<%}else{%>是<%}%></td>
</tr>
<tr>
<td height="23"> 商品描述</td>
<td > <%=goodsForm.getIntroduce()%></td>
<td> 特價價格</td>
<td>
<input name="free" type="text" size="12" >
<input type="submit" name="Submit" value="提交">
</td>
</tr>
<tr>
<td height="79"> 商品圖片</td>
<td colspan="3"> <input name="imageField" type="image" src="<%=goodsForm.getPicture()%>" width="140" height="126"></td>
</tr>
</table> </form>
<table width="90%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="87%" height="29" align="right"> </td>
<td width="13%"> <a href="javascript:history.back();">返回</a></td>
</tr>
</table>
</div></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="60" colspan="2"><p align="center"><jsp:include page="../downNews.jsp"/>
</p> </td>
</tr>
</table>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -