📄 goodsadd.jsp
字号:
<%@ page language="java" import="java.util.*" pageEncoding="GBK"%>
<%
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>添加商品界面</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">
-->
<script type="text/javascript">
function preview5(){
var x = document.getElementById("file5");
if(!x || !x.value) return;
var patn = /\.jpg$|\.jpeg$|\.gif$/i;
if(patn.test(x.value)){var y = document.getElementById("img5");
if(y){y.src = 'file://localhost/' + x.value;
}
else{var img=document.createElement('img');
img.setAttribute('src','file://localhost/'+x.value);
img.setAttribute('width','120');
img.setAttribute('height','90');
img.setAttribute('id','img5');
document.getElementById('form5').appendChild(img);
}
}else{alert("您选择的似乎不是图像文件。");
}
}
</script>
</head>
<body><div>
<div style="position:absolute;left:0px;top:250px;margin:0px;border-width:1px">
<form action="/gouwuche3/imageupload" method=post ENCTYPE="multipart/form-data">
<div id="form5" >
<input type="file" name="file5" id="file5" onchange="preview5()" size=20 />
<br><input type=submit value="上传" />
</div></form> </div>
<div Style="position:absolute;left:230px;top:0px;margin-left:1px;border-style:none;padding-left:0px">
<h3 align="left">添加商品</h3><p> </p>
<form action="/gouwuche3/GoodsAdd" method=get>
<table width="" height="" border="1" >
<tr>
<td width="222" height="68">图书编号:
<input type="text" name="bookid" size=15 readonly=true /> <input type=hidden name="file5" value=<%=request.getParameter("url") %>></td>
<td width="216">图书名:
<input type="text" name="bookname" size=15/></td>
<td width="218" >作者:
<input type="text" name="author" size=15/></td>
</tr>
<tr>
<td height="67">版 本:
<input type="text" name="publish" size=15/></td>
<td width="216">ISBN:
<input type="text" name="isbn" size=15/></td>
<td >库存:
<input type="text" name="storenum" size=15/></td>
</tr>
<tr>
<td height="81">价 格:
<input type="text" name="price" size=15/></td>
<td>页数:
<input type="text" name="page" size=15/></td>
<td>类别:
<input type="text" name="sort" size=15/></td>
</tr>
<tr>
<td height="69">包 装:
<input type="text" name="pack" size=15/></td>
<td colspan="2">内容简介:
<textarea name=conent rows=5 cols=60></textarea>
</td>
</tr>
<tr><td colspan=3><input type="submit" name="submit" value=" 提交" />
<input type="reset" name="reset" value="重置" /> </td></tr>
</table>
</form>
</div>
</div>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -