📄 modi.asp
字号:
<% Option explicit %>
<!-- #Include file="./connects.inc"-->
<!-- #Include file="../globals.inc"-->
<html>
<head>
<title>修改数据</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../style/style.css" rel="stylesheet">
<Script language="JavaScript">
<!--
function reset_or_not()
{ return confirm("真的要擦除重写吗?"); }
function check(frm)
{
if (frm.Orderid.value.length==0)
{alert("排序号不能为空!");
frm.orderid.focus();
return false; }
if (frm.accountid.value=="")
{alert("帐户编号不能为空!");
frm.accountid.focus();
return false; }
if (frm.accountname.value=="")
{alert("帐户名称不能为空!!!");
frm.accountname.focus();
return false; }
}
//-->
</Script>
</head>
<Body topmargin="5" leftmargin="0" background="../../images/bg.gif">
<%
Dim sSQL, rs, max_sortid, sSQLCondition
sSQLCondition=request("sSQLCondition") 'sSQLCondition="autoid=nnn"
sSQL="select * from tabAccountInfo where " & sSQLCondition
'response.write sSQL
set rs=server.createobject("adodb.recordset")
rs.open sSQL, sConn, 1, 1 '由于 f_i_autoid 是主键,所以保证此处只能选择到一条记录
%>
<Form name="frm1" action="save.asp" method="post" OnSubmit="return check(this)" OnReset="return reset_or_not()">
<input type="hidden" name="isToDo" value="Update">
<input type="hidden" name="orderid_old" value="<%=rs("f_i_orderid")%>">
<input type="hidden" name="sSQLCondition" value="<%=sSQLCondition%>">
<table border="0" width="600" align="center">
<tr><td colspan=2 height=25 align=center width="592"><b>修改记录</b></td></tr>
<tr height=25>
<td width="109">【排序号】</td>
<td width="477"><input type="text" name="orderid" size=25 maxlength=10 value="<%=rs("f_i_orderid")%>"> [可以调整记录顺序]</td>
</tr>
<tr height=25>
<td width="109">【帐户编号】</td>
<td width="477"><input type="text" name="accountid" size=45 maxlength=2 value="<%=rs("f_accountid")%>" readonly></td>
</tr>
<tr>
<td width="109">【帐户名】</td>
<td width="477"><input name="accountname" size=45 maxlength=16 value="<%=rs("f_accountname")%>" readonly style="color:#ff0000"></td>
</tr>
<tr>
<td width="109">【口 令】</td>
<td width="477"><input name="password" size=45 maxlength=12 value="<%=rs("f_password")%>"></td>
</tr>
<tr>
<td width="109">【帐号类型】</td>
<td width="477"><input name="accounttype" size=45 maxlength=12 value="<%=rs("f_accounttype")%>" readonly></td>
</tr>
<tr>
<td width="109" vAlign=top>【用户姓名】</td>
<td width="477"><input name="username" size=45 maxlength=8 value="<%=rs("f_username")%>"></td>
</tr>
<tr>
<td width="109">【备注】</td>
<td width="477">
<input type="text" name="Remark" size=45 maxlength=50 value="<%=rs("f_remark")%>">
</td>
</tr>
<tr>
<td width="109">【记录添加时间】</td>
<td width="477"><input type="text" name="datatime" size=45 value="" readonly></td>
</tr>
<tr>
<td colspan=2 height=8 width="592"></td>
</tr>
<tr>
<td width="109"></td>
<td width="477">
<input type="submit" value=" 保存 ">
<input type="reset" value=" 重置 ">
<input type="button" value=" 返回 " onClick="history.go(-2);">
</td>
</tr>
</Form>
</table>
<%
set rs=nothing
%>
<Script language='JavaScript'>
<!--
function clock()
{
now=new Date;
month=now.getMonth();
month=month+1;
document.frm1.datatime.value=now.getYear()+"-"+month+"-"+now.getDate()+" "+now.getHours()+":"+now.getMinutes()+":"+now.getSeconds();
setTimeout("clock()",1000);
}
clock();
//-->
</Script>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -