?? editjiangpin.asp
字號:
<!--#include file="conn.asp"-->
<%if session("bjxadmin")="" then
response.Write "<script LANGUAGE='javascript'>alert('網絡超時或者您還沒有登錄請登錄');window.location.href='login.asp';</script>"
response.End
end if
if request("id")<>"" then
if not isnumeric(request("id")) then
response.write"<script>alert(""非法訪問!"");location.href=""../index.asp"";</script>"
response.end
end if
end if
%>
<html><head><title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../images/css.css" rel="stylesheet" type="text/css">
</head>
<body>
<table class="tableBorder" width="90%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#FFFFFF">
<tr>
<td align="center" background="../images/admin_bg_1.gif"><b><font color="#ffffff">修改獎品</font></b></td>
</tr>
<tr>
<form name="myform" method="post" action="savejiangpin.asp?action=edit&id=<%=request("id")%>" OnSubmit="return checkkk()" >
<td>
<%dim rs1
set rs1=server.CreateObject("adodb.recordset")
rs1.open "select * from BJX_jiangpin where bookid="&request("id"),conn,1,1%>
<table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" bgcolor="#FFFFFF">
<tr >
<td width="30%" align="right">獎品名稱: </td>
<td width="70%"><input name="bookname" type="text" id="bookname" size="30" value="<%=trim(rs1("bookname"))%>">
</td>
</tr>
<tr >
<td align="right">獎品規格: </td>
<td><input name="guige" type="text" id="guige" size="20" value="<%=trim(rs1("guige"))%>"></td>
</tr>
<tr >
<td align="right"> </td>
<td>市場價:
<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="<%=trim(rs1("shichangjia"))%>">
元,所需積分:
<input name="jifen" type="text" id="jifen" 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="<%=trim(rs1("jifen"))%>">
</td>
</tr>
<tr >
<td align="right">獎品圖片: </td>
<td><input name="bookpic" type="text" id="bookpic" size="30" value="<%=trim(rs1("bookpic"))%>">
<input type="button" name="Submit2" value="上傳小圖片" onClick="window.open('../BJXupload.asp?formname=myform&editname=bookpic&uppath=bjxGpic&filelx=jpg','','status=no,scrollbars=no,top=20,left=110,width=420,height=165')">
</td>
</tr>
<tr >
<td align="right"></td>
<td><input name="bookpic2" type="text" id="bookpic2" size="30" value="<%=trim(rs1("bookpic2"))%>">
<input type="button" name="Submit2" value="上傳大圖片" onClick="window.open('../BJXupload.asp?formname=myform&editname=bookpic2&uppath=bjxGpic&filelx=jpg','','status=no,scrollbars=no,top=20,left=110,width=420,height=165')">
</td>
</tr>
<tr >
<td valign="top" align="right">獎品說明: </td>
<td><textarea name="bookcontent" cols="46" rows="8" id="bookcontent"><%=trim(rs1("bookcontent"))%></textarea>
</td>
</tr>
<tr >
<td align="right"></td>
<td><input type="submit" name="Submit" value="修 改">
<input name="xianshi" type="checkbox" id="xianshi" value="1" <%if rs1("xianshi")=1 then%>checked<%end if%>>
顯示(指讓不讓用戶在前臺看到)</td>
</tr>
</table>
<%rs1.close
set rs1=nothing%>
</td>
</form>
</tr>
</table>
<!--#include file="bjxfoot.asp"-->
</body>
</html>
<SCRIPT LANGUAGE="JavaScript">
<!--
function checkkk()
{
if(checkspace(document.myform.bookname.value)) {
document.myform.bookname.focus();
alert("請輸入商品名稱!");
return false;
}
if(checkspace(document.myform.shichangjia.value)) {
document.myform.shichangjia.focus();
alert("請輸入市場價格!");
return false;
}
if(checkspace(document.myform.jifen.value)) {
document.myform.jifen.focus();
alert("請輸入所需積分!");
return false;
}
}
function checkspace(checkstr) {
var str = '';
for(i = 0; i < checkstr.length; i++) {
str = str + ' ';
}
return (str == checkstr);
}
//-->
</script>
<script>
function regInput(obj, reg, inputStr)
{
var docSel = document.selection.createRange()
if (docSel.parentElement().tagName != "INPUT") return false
oSel = docSel.duplicate()
oSel.text = ""
var srcRange = obj.createTextRange()
oSel.setEndPoint("StartToStart", srcRange)
var str = oSel.text + inputStr + srcRange.text.substr(oSel.text.length)
return reg.test(str)
}
</script>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -