editbook.asp
来自「创建和运行动态、交互的Web服务器应用程序」· ASP 代码 · 共 399 行 · 第 1/2 页
ASP
399 行
rs.movenext
loop
response.Write "</select>"
rs.close
set rs=nothing%>
小类 <select name="Nclassid" size="1" id="nclassid">
<%do while not rs22.eof%>
<option value=<%=rs22("nclassid")%>
<%if int(rs1("nclassid"))=int(rs22("nclassid")) then
response.Write " selected>"
else
response.Write ">"
end if
response.Write trim(rs22("nclass"))&"</option>"
rs22.movenext
loop
response.Write "</select>"
rs22.close
set rs22=nothing%></td>
</tr>
<tr>
<td bgcolor="#eeeeee" align=right>书名 </td>
<td bgcolor="#eeeeee" colspan="2"><input name="bookname" type="text" id="bookname" size="30" value="<%=trim(rs1("bookname"))%>"></td>
</tr>
<tr>
<td bgcolor="#eeeeee" align=right>书号 </td>
<td bgcolor="#eeeeee" colspan="2"><input name="isbn" type="text" id="isbn" size="30" value="<%=trim(rs1("isbn"))%>"></td>
</tr>
<tr>
<td bgcolor="#eeeeee" align=right>作者 </td>
<td bgcolor="#eeeeee" colspan="2"><input name="bookzz" type="text" id="bookzz" size="30" value="<%=trim(rs1("bookzz"))%>"></td>
</tr>
<tr>
<td bgcolor="#eeeeee" align=right>出版社 </td>
<td bgcolor="#eeeeee" colspan="2"><input name="bookchuban" type="text" id="bookchuban" size="30" value="<%=trim(rs1("bookchuban"))%>" onfocus='showpub()'>
<br>
<div id='add_publish' name='add_publish' style='display:none'>
<select name="publish" size="2" id="publish" style="width:222px;height=80px" onChange="changepub(document.myform.publish.options[document.myform.publish.selectedIndex].value)">
<option value="" selected>--请选择--</option>
<%do while not rs33.eof%>
<option value=<%=trim(rs33("bookchuban"))%>>
<%response.Write trim(rs33("bookchuban"))&"</option>"
rs33.movenext
loop
response.Write "</select>"
rs33.close
set rs33=nothing%></div></td>
</tr>
<tr>
<td bgcolor="#eeeeee" align=right height="20">出版日期 </td>
<td bgcolor="#eeeeee" colspan="2"><select name="bookdateyear" id="bookdateyear">
<%dim i,ii
for i=1996 to 2010
if i=year(rs1("bookdate")) then
response.write "<option value="&i&" selected>"&i&"</option>"
else
response.write "<option value="&i&">"&i&"</option>"
end if
next%></select> 年
<select name="bookdatemonth" id="bookdatemonth"><%
for ii=1 to 12
if ii=month(rs1("bookdate")) then
response.write "<option value="&ii&" selected>"&ii&"</option>"
else
response.write "<option value="&ii&">"&ii&"</option>"
end if
next%></select> 月</td>
</tr>
<tr>
<td bgcolor="#eeeeee" align=right>价格 </td>
<td bgcolor="#eeeeee" colspan="2">市场价 <input name="shichangjia" type="text" id="shichangjia" size="6" onkeypress = "return regInput(this, /^\d*\.?\d{0,2}$/, String.fromCharCode(event.keyCode))"
onpaste = "return regInput(this, /^\d*\.?\d{0,2}$/, window.clipboardData.getData('Text'))"
ondrop = "return regInput(this, /^\d*\.?\d{0,2}$/, event.dataTransfer.getData('Text'))" value="<%=rs1("shichangjia")%>"> 元,
会员价 <input name="huiyuanjia" type="text" id="huiyuanjia" size="6" onkeypress = "return regInput(this, /^\d*\.?\d{0,2}$/, String.fromCharCode(event.keyCode))"
onpaste = "return regInput(this, /^\d*\.?\d{0,2}$/, window.clipboardData.getData('Text'))"
ondrop = "return regInput(this, /^\d*\.?\d{0,2}$/, event.dataTransfer.getData('Text'))" value="<%=rs1("huiyuanjia")%>"> 元</td>
</tr>
<tr>
<td bgcolor="#eeeeee" align=right>其它资料 </td>
<td bgcolor="#eeeeee" colspan="2">开本 <select name="kaiben" id="kaiben">
<%select case trim(rs1("kaiben"))
case "16"%>
<option value="16" selected>16</option>
<option value="32">32</option>
<option value="小32">小32</option><%
case "32"%>
<option value="16">16</option>
<option value="32" selected>32</option>
<option value="小32">小32</option><%
case "小32"%>
<option value="16">16</option>
<option value="32">32</option>
<option value="小32" selected>小32</option>
<%end select%>
</select>,
版次 <input name="banci" size="4" type="text" onkeypress = "return regInput(this, /^[0-9]*$/, String.fromCharCode(event.keyCode))"
onpaste = "return regInput(this, /^[0-9]*$/, window.clipboardData.getData('Text'))"
ondrop = "return regInput(this, /^[0-9]*$/, event.dataTransfer.getData('Text'))" value="<%=cstr(rs1("banci"))%>"> 次,
页数 <input name="yeshu" type="text" id="yeshu" size="4" onkeypress = "return regInput(this, /^[0-9]*$/, String.fromCharCode(event.keyCode))"
onpaste = "return regInput(this, /^[0-9]*$/, window.clipboardData.getData('Text'))"
ondrop = "return regInput(this, /^[0-9]*$/, event.dataTransfer.getData('Text'))" value="<%=cstr(rs1("yeshu"))%>"> 页</td>
</tr>
<tr>
<td bgcolor="#eeeeee" align=right>装帧方式 </td>
<td bgcolor="#eeeeee" colspan="2"><select name="zhuang" id="zhuang">
<%select case trim(rs1("zhuang"))
case "简装"%>
<option value="简装" selected>简装</option>
<option value="精装">精装</option>
<option value="特殊">特殊</option><%
case "精装"%>
<option value="简装">简装</option>
<option value="精装" selected>精装</option>
<option value="特殊">特殊</option><%
case "特殊"%>
<option value="简装">简装</option>
<option value="精装">精装</option>
<option value="特殊" selected>特殊</option>
<%end select%>
</select>
主荐此书
<select name="bbestbook" id="bbestbook">
<%select case trim(rs1("bbestbook"))
case "0"%>
<option value="0" selected>否</option>
<option value="1">是</option><%
case "1"%>
<option value="0">否</option>
<option value="1" selected>是</option>
<%end select%>
</select>
推荐此书
<select name="bestbook" id="bestbook">
<%select case trim(rs1("bestbook"))
case "0"%>
<option value="0" selected>否</option>
<option value="1">是</option><%
case "1"%>
<option value="0">否</option>
<option value="1" selected>是</option>
<%end select%>
</select>
</tr>
<tr>
<td bgcolor="#eeeeee" align=right height="18">封面 </td>
<td height="18" bgcolor="#eeeeee" colspan="2"><input name="bookpic" type="text" id="bookpic" size="40" value="<%=trim(rs1("bookpic"))%>">
<input type='checkbox' name='bkpicedit' onclick='showedit()'><font color=blue>修改</font></a></td>
</tr>
<tr>
<td bgcolor="#eeeeee" align=right valign="center">内容简介 </td>
<td bgcolor="#eeeeee" colspan="2"><textarea name="bookcontent" cols="46" rows="8" id="bookcontent"><%=trim(rs1("bookcontent"))%></textarea></td>
</tr>
<tr>
<td bgcolor="#eeeeee" align=right valign="center">图书目录 </td>
<td bgcolor="#eeeeee" colspan="2"><textarea name="bookmulu" cols="46" rows="8" id="bookmulu"><%=trim(rs1("bookmulu"))%></textarea></td>
</tr>
<tr>
<td bgcolor="#ece9d8" colspan="3" align="center"><div id='edit_bookpicok' name='edit_bookpicok' style='display:""'><input type="submit" name="Submit1" value="修 改" onClick="return check();"></td>
</tr></div>
</form>
</table>
<div id='edit_bookpicup' name='edit_bookpicup' style='display:none'>
<table width="100%" border="0" align=center cellspacing="1" cellpadding="3" bgcolor="#ffffff">
<form name="form1" method="post" action="upfile.asp?action=editbkpic&id=<%=bookid%>" enctype="multipart/form-data" onsubmit="checkImage('file1')">
<input type="hidden" name="act" value="upload">
<tr height=35><td bgcolor="#eeeeee" width="10%" align=right><input type="hidden" name="filepath" value="../bookpic/">封面位置
<td bgcolor="#eeeeee"><input type="file" name="file1" style="width:415" class="tx1" value="">
<input type="submit" name="Submit2" value="上 传">
<input type="reset" name="Submit3" value="清 除"></td>
</tr>
</form>
</table>
</div>
<br>
</tr>
</table>
</tr>
</table>
</tr>
</table>
<% rs1.close
set rs1=nothing
conn.close
set conn=nothing
%>
</body>
</html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?