📄 goodsinfo.jsp
字号:
<%@ page language="java" import="java.util.*" pageEncoding="gbk"%>
<%@ page import="bean.Goods"%>
<%
ArrayList<Goods> single = (ArrayList<Goods>) session
.getAttribute("singleresult");
Goods g = single.get(0);
%>
<html>
<head>
<title>My JSP 'GoodsChange.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">
-->
<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>
<h3 align="left">
商品详细信息
</h3>
<p>
</p>
<form action="/gouwuche3/GoodsChange" method="get">
<table width="898" height="368" border="1">
<tr>
<td width="214" rowspan="5" align=center>
<div id="form5">
<input type="file" name="file5" id="file5" value="g.getImgurl()"
onchange="preview5()" />
</div>
</td>
<td width="222" height="68">
编号:
<input type="text" name="bookid" value="<%=g.getBookid()%>"
size=15 onclick="javascript:this.value='';" />
</td>
<td width="216">
书名:
<input type="text" name="bookname" value="<%=g.getBookname()%>"
size=18 onclick="javascript:this.value='';" />
</td>
<td width="218">
作者:
<input type="text" name="author" value="<%=g.getAuthor()%>"
size=15 onclick="javascript:this.value='';" />
</td>
</tr>
<tr>
<td height="67">
出版社:
<input type="text" name="publish" value="<%=g.getPublish()%>"
size=15 onclick="javascript:this.value='';" />
</td>
<td width="216">
ISBN:
<input type="text" name="isbn" value="<%=g.getIsbn()%>" size=15
onclick="javascript:this.value='';" />
</td>
<td>
库存:
<input type="text" name="storenum" value="<%=g.getStorenum()%>"
size=15 onclick="javascript:this.value='';" />
</td>
</tr>
<tr>
<td height="81">
字 数:
<input type="text" name="words" value="<%=g.getWords()%>" size=15
onclick="javascript:this.value='';" />
</td>
<td>
页数:
<input type="text" name="pages" value="<%=g.getPages()%>" size=15
onclick="javascript:this.value='';" />
</td>
<td>
类别:
<input type="text" name="sort" value="<%=g.getSort()%>" size=15
onclick="javascript:this.value='';" />
</td>
</tr>
<tr>
<td height="69">
包 装:
<input type="text" name="pack" value="<%=g.getPack()%>" size=15
onclick="javascript:this.value='';"/></td>
<td>价格
<input type=text name="price" value="<%=g.getPrice()%>" onclick="javascript:this.value='';" />
</td>
<td><div>内容简介:</div><textarea name=conent onclick="javascript:this.value='';"><%=g.getContent()%>
</textarea> </td></tr>
</table>
<div style="margin: 10 10 10 410;">
<input type="submit" name="submit" value="提交修改"
style="width: 118px" />
<input type="reset" name="reset" value="放弃修改" style="width: 118px" onClick="javaScript:history.back(-1)"/>
</div></form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -