|
|
<%@ page language="java" import="java.util.*" pageEncoding="GB18030"%>
|
|
|
<%
|
|
|
String path = request.getContextPath();
|
|
|
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
|
|
|
%>
|
|
|
|
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
|
<html>
|
|
|
<head>
|
|
|
<base href="<%=basePath%>">
|
|
|
|
|
|
<title>My JSP 'NewGoodsShow.jsp' starting page</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">
|
|
|
-->
|
|
|
|
|
|
</head>
|
|
|
|
|
|
<body background="images/huang.jpg">
|
|
|
<SCRIPT LANGUAGE="JavaScript">
|
|
|
function validate_required(field,alerttxt)
|
|
|
{
|
|
|
with (field)
|
|
|
{
|
|
|
if (value==null||value=="")
|
|
|
{alert(alerttxt);return false}
|
|
|
else {return true}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
function validate_form(thisform)
|
|
|
{
|
|
|
with (thisform)
|
|
|
{
|
|
|
if (validate_required(gname,"商品名称必须填写")==false)
|
|
|
{gname.focus();return false}
|
|
|
if (validate_required(gprice,"商品价格必须填写")==false)
|
|
|
{gprice.focus();return false}
|
|
|
|
|
|
if (validate_required(gnumber,"商品数量必须填写")==false)
|
|
|
{gnumber.focus();return false}
|
|
|
|
|
|
if (validate_required(gdiscount,"商品折扣必须填写")==false)
|
|
|
{gdiscount.focus();return false}
|
|
|
if (validate_required(gapply,"商品类型必须填写")==false)
|
|
|
{gnumber.focus();return false}
|
|
|
if (validate_required(gspic,"展示图片(小)必须填写")==false)
|
|
|
{gspic.focus();return false}
|
|
|
|
|
|
if (validate_required(gcpu,"CPU名称必须填写")==false)
|
|
|
{gcpu.focus();return false}
|
|
|
|
|
|
if (validate_required(gram,"内存名称必须填写")==false)
|
|
|
{gram.focus();return false}
|
|
|
|
|
|
if (validate_required(gsata,"硬盘名称必须填写")==false)
|
|
|
{gsata.focus();return false}
|
|
|
|
|
|
if (validate_required(gvideocard,"刻录机名称必须填写")==false)
|
|
|
{gvideocard.focus();return false}
|
|
|
|
|
|
if (validate_required(gsystem,"系统名称必须填写")==false)
|
|
|
{gsystem.focus();return false}
|
|
|
|
|
|
if (validate_required(gheft,"重量必须填写")==false)
|
|
|
{gheft.focus();return false}
|
|
|
|
|
|
if (validate_required(gbluetooth,"蓝牙必须填写")==false)
|
|
|
{gbluetooth.focus();return false}
|
|
|
|
|
|
if (validate_required(gmonito,"屏幕必须填写")==false)
|
|
|
{gmonito.focus();return false}
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
</SCRIPT>
|
|
|
<center>
|
|
|
<form action="servlet/NewGoodsFixServlet" method="post" onsubmit="return validate_form(this)" enctype="multipart/form-data" style="background-image: images/huang.jpg" >
|
|
|
<table width="50%" border="1">
|
|
|
<tr>
|
|
|
<td>
|
|
|
商品名称:
|
|
|
</td>
|
|
|
<td>
|
|
|
<input type="text" name="gname" >
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td>
|
|
|
商品价格:
|
|
|
</td>
|
|
|
<td>
|
|
|
<input type="text" name="gprice" />
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td>
|
|
|
商品数量:
|
|
|
</td>
|
|
|
<td>
|
|
|
<input type="text" name="gnumber" />
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td>
|
|
|
商品折扣:
|
|
|
</td>
|
|
|
<td>
|
|
|
<input type="text" name="gdiscount" />
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td>
|
|
|
商品类型:
|
|
|
</td>
|
|
|
<td>
|
|
|
<input type="text" name="gapply" />
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td>
|
|
|
展示图片(小):
|
|
|
</td>
|
|
|
<td>
|
|
|
<input type="file" name="f1"/>
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td>
|
|
|
CPU:
|
|
|
</td>
|
|
|
<td>
|
|
|
<input type="text" name="gcpu" />
|
|
|
</td>
|
|
|
<tr>
|
|
|
<td>
|
|
|
内存:
|
|
|
</td>
|
|
|
<td>
|
|
|
<input type="text" name="gram" />
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td>
|
|
|
硬盘:
|
|
|
</td>
|
|
|
<td>
|
|
|
<input type="text" name="gsata" />
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td>
|
|
|
刻录机:
|
|
|
</td>
|
|
|
<td>
|
|
|
<input type="text" name="gvideocard" />
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td>
|
|
|
系统:
|
|
|
</td>
|
|
|
<td>
|
|
|
<input type="text" name="gsystem" />
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td>
|
|
|
重量:
|
|
|
</td>
|
|
|
<td>
|
|
|
<input type="text" name="gheft" />
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td>
|
|
|
蓝牙:
|
|
|
</td>
|
|
|
<td>
|
|
|
<input type="text" name="gbluetooth" />
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td>
|
|
|
屏幕:
|
|
|
</td>
|
|
|
<td>
|
|
|
<input type="text" name="gmonito" />
|
|
|
</td>
|
|
|
<tr>
|
|
|
<td>
|
|
|
展示图片(大)1:
|
|
|
</td>
|
|
|
<td>
|
|
|
<input type="file" name="f2"/>
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td>
|
|
|
展示图片(大)2:
|
|
|
</td>
|
|
|
<td>
|
|
|
<input type="file" name="f3"/>
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td>
|
|
|
展示图片(大)3:
|
|
|
</td>
|
|
|
<td>
|
|
|
<input type="file" name="f4"/>
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td>
|
|
|
展示图片(大)4:
|
|
|
</td>
|
|
|
<td>
|
|
|
<input type="file" name="f5"/>
|
|
|
</td>
|
|
|
</tr>
|
|
|
</table>
|
|
|
<br/>
|
|
|
<input type="submit" value="确认添加">
|
|
|
</form>
|
|
|
<form action="servlet/AdGoodsListServlet">
|
|
|
<input type="submit" value="返回">
|
|
|
</form>
|
|
|
</center>
|
|
|
|
|
|
</body>
|
|
|
</html>
|