代码清单模板Word文件下载.docx
《代码清单模板Word文件下载.docx》由会员分享,可在线阅读,更多相关《代码清单模板Word文件下载.docx(36页珍藏版)》请在冰豆网上搜索。
functioncheck()
{
if(document.form1.name.value=="
"
||document.form1.pic.value=="
||document.form1.author.value=="
||document.form1.chubanshe.value=="
||document.form1.jiage.value=="
||document.form1.dazhe.value=="
||document.form1.shuliang.value=="
)
{
alert("
必À
?
须?
填¬
写¡
ä
所¨
´
有®
D项?
目?
!
ê
);
returnfalse;
}
if(isNaN(document.form1.shuliang.value))
window.alert("
请?
正y确¨
¡
¤
输º
入¨
数º
y量¢
document.form1.shuliang.focus();
if(document.form1.pic.value!
="
varfileext=form1.pic.value.substring(form1.pic.value.length-4,form1.pic.value.length);
fileext=fileext.toLowerCase();
if(!
(fileext=='
.jpg'
)&
&
.gif'
))
{
alert("
对?
不?
起e,ê
文?
件t格?
式º
必À
为ajpg或¨
°
gif格?
件t!
form1.pic.focus();
returnfalse;
}
form1.submit();
//-->
/script>
linkhref="
/sjxs/css/local.css"
rel="
stylesheet"
type="
text/css"
/sjxs/css/text.css"
styletype="
.STYLE19{border-top-width:
1px;
border-right-width:
border-bottom-width:
border-left-width:
border-top-style:
solid;
border-right-style:
border-bottom-style:
none;
border-left-style:
border-top-color:
#9f9f9f;
border-right-color:
border-bottom-color:
border-left-color:
font-family:
"
宋?
体¬
;
font-size:
12px;
color:
#FF0000;
padding-top:
5px;
text-align:
center;
-->
/style>
/head>
%
Stringhidden=request.getParameter("
hidden"
if(hidden==null){
hidden="
elseif(hidden.trim().equals("
ok"
)){
out.println("
scriptlanguage='
javascript'
alert('
上¦
传ä
成¨
¦
功|!
'
no"
失º
ì
败ã
¨
¹
,ê
前¡
ã
只?
能¨
jpg、¡
é
的Ì
图ª
片?
并¡
且¨
大ä
®
于®
²
500K!
error"
系¦
Ì
统ª
3维?
护¡
è
中D,ê
稍¦
后¨
再¨
试º
kong"
选?
择?
%>
Stringmessage=(String)request.getAttribute("
message"
if(message==null){
message="
if(!
message.trim().equals("
+message+"
request.removeAttribute("
Stringname=(String)session.getAttribute("
name"
if(name==null){
response.sendRedirect("
/sjxs/admin/login.jsp"
else{
%>
body>
formaction="
/sjxs/admin/upload.jsp"
name="
form1"
method="
post"
enctype="
multipart/form-data"
>
<
inputtype="
method"
value="
addbook"
tablewidth="
100%"
height="
cellpadding="
0"
cellspacing="
tr>
tdheight="
121"
align="
center"
valign="
top"
bgcolor="
#FFFFFF"
divalign="
left"
br>
spanclass="
black14"
?
strong>
当Ì
À
位?
置?
:
/strong>
手º
机¨
管¨
理¤
ª
/span>
/div>
98%"
tdwidth="
96"
1"
#5D8191"
class="
/td>
/tr>
2"
w12"
TRbgcolor="
#cccccc"
TDalign="
bgColor=#ffffff>
20"
colspan="
pclass="
w14"
增?
加¨
/p>
100"
hb"
59%"
tdalign="
right"
30"
名?
称?
INPUTtype="
text"
maxLength=20size=30name="
td>
INPUTtype=filename="
pic"
maxLength=20size=30>
来¤
源¡
地Ì
INPUTtype=textname=authormaxLength=20size=30>
制?
造¨
¬
商¦
INPUTtype=textname=chubanshemaxLength=20size=30>
价?
格?
INPUTtype=textname=jiagemaxLength=20size=30>
类¤
别À
e:
<
selectname=leibie>
Listlist=newBookBean().getAllType();
for(inti=0;
i<
list.size();
i++){
%>
optionvalue=<
%=list.get(i).toString()%>
/option>
%}%>
<
/select>
是º
否¤
带ä
附?
件t:
selectname=disc>
optionvalue="
折?
率¨
º
(ê
§
1为a不?
打ä
0.8为a8折?
)ê
INPUTtype=textname=dazhemaxLength=20size=30>
推ª
荐?
程¨
度¨
selectname=tuijian>
★?
★?
INPUTtype=textname=shuliangmaxLength=20size=30onbeforepaste="
clipboardData.setData('
text'
clipboardData.getData('
).replace(/[^\d]/g,'
))"
onkeyup="
value=value.replace(/[\W]/g,'
)"
/table>
200"
inputname="
Submit32"
button"
black12"
确¨
认¨
onclick="
check()"
Submit3"
reset"
重?
4"
bordercolor="
12txt18"
nbsp;
/TD>
/TR>
/form>
/body>
/html>
addbook.JSP实现图片的上传
{
if(document.form1.fenlei.value=="
window.alert("
分¤
document.form1.admin_name.focus();
if(document.form1.fenlei.value.indexOf("
)!
=-1){
中D不?
含?
D空?
document.form1.admin_name.focus();
}
if(document.form1.admin_name.value.length<
2||document.form1.admin_name.value.length>
10)
长¡
为a6-10位?
%Stringname=(String)session.getAttribute("
/sjxs/BookManage.jsp"
onSubmit="
returncheck()"
add"
10