📄 department_update.asp
字号:
<%@LANGUAGE="JAVASCRIPT" CODEPAGE="936"%>
<!--#include file="forbidon.asp" -->
<!--#include file="conn.asp" -->
<%
var id1=Request("id");
var rs = Server.CreateObject("ADODB.Recordset");
rs.ActiveConnection = MM_conn_STRING;
rs.Source = "SELECT * FROM department Where departmentid="+id1+" ORDER BY departmentid ASC";
rs.CursorType = 0;
rs.CursorLocation = 2;
rs.LockType = 1;
rs.Open();
var rs_numRows = 0;
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<link href="../imag/cs.css" rel="stylesheet" type="text/css" />
</head>
<body>
<Script Language="Javascript">
function chk(){
if (document.form.department.value=="")
{
alert ("部门名称不能为空,请重新输入");
document.form.department.focus();
document.form.department.select();
return false;
}
if (document.form.admin1.value=="")
{
alert ("负责人不能为空,请重新输入");
document.form.admin1.focus();
document.form.admin1.select();
return false;
}
if (document.form.pw1.value=="")
{
alert ("正负责人密码不能为空,请重新输入");
document.form.pw1.focus();
document.form.pw1.select();
return false;
}
if (document.form.admin2.value=="")
{
alert ("负责人不能为空,请重新输入");
document.form.admin2.focus();
document.form.admin2.select();
return false;
}
if (document.form.pw2.value=="")
{
alert ("副负责人密码不能为空,请重新输入");
document.form.pw2.focus();
document.form.pw2.select();
return false;
}
return true;
}
</Script>
<!--#include file="top.asp" -->
<table width="80%" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" class="atable">
<tr>
<td bgcolor="#FFFFFF">
<form action="department_update_x.asp" method="post" name="form" id="form" onsubmit="return chk()">
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="2">
<tr>
<td width="6%" bgcolor="#FFCACA" class="unnamedhei"><div align="center">部门号</div></td>
<td width="28%" bgcolor="#FFCACA" class="unnamedhei"><div align="center">部门名称</div></td>
<td width="17%" bgcolor="#FFCACA" class="unnamedhei"><div align="center">负责人(正)</div></td>
<td width="17%" bgcolor="#FFCACA" class="unnamedhei"><div align="center">负责人密码(正)</div></td>
<td width="16%" bgcolor="#FFCACA" class="unnamedhei"><div align="center">负责人(副)</div></td>
<td width="16%" bgcolor="#FFCACA" class="unnamedhei"><div align="center">负责人密码(副)</div></td>
</tr>
<tr>
<td bgcolor="#FFFFFF"><div align="center" class="atable"><%=(rs.Fields.Item("departmentid").Value)%></div></td>
<td bgcolor="#FFFFFF"><div align="center">
<input name="department" type="text" class="atable" id="department" value="<%=(rs.Fields.Item("departmentname").Value)%>" size="30" />
</div></td>
<td bgcolor="#FFFFFF"><div align="center">
<input name="admin1" type="text" class="atable" id="admin1" value="<%=(rs.Fields.Item("admin1").Value)%>" size="16" maxlength="16" />
</div></td>
<td bgcolor="#FFFFFF"><div align="center">
<input name="pw1" type="text" class="atable" id="pw1" value="<%=(rs.Fields.Item("pw1").Value)%>" size="16" maxlength="16" />
</div></td>
<td bgcolor="#FFFFFF"><div align="center">
<input name="admin2" type="text" class="atable" id="admin2" value="<%=(rs.Fields.Item("admin2").Value)%>" size="16" maxlength="16" />
</div></td>
<td bgcolor="#FFFFFF"><div align="center">
<input name="pw2" type="text" class="atable" id="pw2" value="<%=(rs.Fields.Item("pw2").Value)%>" size="16" maxlength="16" />
</div></td>
</tr>
<tr>
<td bgcolor="#FAFAFA"> </td>
<td bgcolor="#FAFAFA">请在对应的栏目中输入你要修改的信息</td>
<td bgcolor="#FAFAFA">
<div align="center">
<input name="提交" type="submit" class="binput" value="提交" />
</div></td>
<td bgcolor="#FAFAFA"><input name="button" type="reset" class="binput" value="重置" /></td>
<td bgcolor="#FAFAFA"><input name="idx" type="hidden" id="idx" value="<%=(rs.Fields.Item("departmentid").Value)%>" /></td>
<td bgcolor="#FAFAFA"> </td>
</tr>
</table>
</form></td>
</tr>
</table>
</body>
</html>
<%
rs.Close();
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -