⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 zx_xxlrdw.asp

📁 数据结构课程设计之最小生成数的K算法的实现 简短 简洁
💻 ASP
字号:
<!--#include file="../conn.asp"-->
<%
session("aspname")=request("aspname")
session("bh")=request("bh")
aspname=request("aspname")
xin=request("xin")
bh=request("bh")
bid=request("bid")
dwmc=""
dwlb=""
dwpm=""

%>

<link rel="stylesheet" type="text/css" href="../style.css">
<body topmargin="0" leftmargin="0" bgcolor="#dddddd">
<script>
var x
x="<%=request.form("submitx")%>"
if (x=="查 询"){
window.location="select.asp?aspname=<%=aspname%>&bh=<%=bh%>"
}
</script>
<script>
var y
y="<%=request.form("submity")%>"
if (y=="新 增"){
window.location="<%=aspname%>.asp?aspname=<%=aspname%>&bh=<%=bh%>&name=<%=name%>&xin=1"
}
</script>
<%
action="add"
if xin=0 then
	sql="select * from ZXXMdw Where ZXXMdw_id='"& bid &"'"
	set rs=server.Createobject("ADODB.Recordset")
	rs.open sql,conn,1,3
	if rs.eof then
		if request.form("submitn")=" 提 交 " then
			ktbh=request("bh")
			dwmc=request.form("dwmc")
			dwlb=request.form("dwlb2")
			dwpm=request.form("dwpm")
			rs.addnew
			rs("Zxxm_no")=ktbh
			rs("Zxxmdw_pm")=dwpm
			rs("Zxxmdw_dwlb")=dwlb
			rs("Zxxmdw_dwmc")=dwmc
			rs.update
			action="suc"
			errn="单位信息录入成功!"
		end if
	else		
		ktbh=rs("Zxxm_no")
		dwpm=rs("Zxxmdw_pm")
		dwlb=rs("Zxxmdw_dwlb")
		dwlb2=dwlb
		dwmc=rs("Zxxmdw_dwmc")
		if request.form("submitn")=" 提 交 " then
			ktbh=request.form("ktbh")
			dwmc=request.form("dwmc")
			dwlb=request.form("dwlb2")
			dwpm=request.form("dwpm")
			rs("Zxxm_no")=ktbh
			rs("Zxxmdw_pm")=dwpm
			rs("Zxxmdw_dwlb")=dwlb
			rs("Zxxmdw_dwmc")=dwmc
			rs.update
			action="suc"
			errn="单位信息录入成功!"
		end if
	end if
elseif xin=1 then
		sql="select * from ZXXMDW"
		set rs=server.Createobject("ADODB.Recordset")
		rs.open sql,conn,1,3
		if request.form("submitn")=" 提 交 " then
			ktbh=request("bh")
			dwmc=request.form("dwmc")
			dwlb=request.form("dwlb2")
			dwpm=request.form("dwpm")
			rs.addnew
			rs("Zxxm_no")=ktbh
			rs("Zxxmdw_pM")=dwpm
			rs("Zxxmdw_DWlb")=dwlb
			rs("Zxxmdw_dwmc")=dwmc
			rs.update
			action="suc"
			errn="单位信息录入成功!"
		end if
end if
%>

<%if action="add" then%>
<br>
<br>

<table width="100%" height="195" border="0" cellpadding="0" cellspacing="0" bordercolor="#D6CFCE" background=>
  <tr> 
    <td height="28"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td><div align="center"><strong>纵向项目单位信息表</strong></div></td>
        </tr>
      </table></td>
  </tr>
  <tr> 
    <td height="165"> <div align="right">
	<form name="form1"  class="" method="post"> 
          <table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
            <tr> 
              <td width="25%"><div align="right">课题编号:</div></td>
              <td><input name="ktbh" type=text id="ktbh" readonly="" value="<%=bh%>" style="BORDER-RIGHT: #ffffff 1px groove; BORDER-TOP: #ffffff 1px groove; FONT: 12px Verdana,Geneva,sans-serif; BORDER-LEFT: #ffffff 1px groove; WIDTH: 160px; COLOR: #000000; BORDER-BOTTOM: #ffffff 1px groove; HEIGHT: 18px; BACKGROUND-COLOR: #C0C0C0" size=12 maxlength=20></td>
            </tr>
            <tr> 
              <td > </td>
              <td> </td>
            </tr>
            <tr> 
              <td height="20"><div align="right">单位名称:</div></td>
              <td><input name="dwmc" type=text id="ktbh22"  value="<%=dwmc%>" style="BORDER-RIGHT: #ffffff 1px groove; BORDER-TOP: #ffffff 1px groove; FONT: 12px Verdana,Geneva,sans-serif; BORDER-LEFT: #ffffff 1px groove; WIDTH: 320px; COLOR: #000000; BORDER-BOTTOM: #ffffff 1px groove; HEIGHT: 18px; BACKGROUND-COLOR: #dff1f9" size=12 maxlength=40></td>
            </tr>
            <tr> 
              <td> </td>
              <td> </td>
            </tr>
            <tr> 
              <td><div align="right">单位类别:</div></td>
              <td> <input name="dwlb" value="<%=dwlb%>" readonly="" type=text id="dwlb" style="BORDER-RIGHT: #ffffff 1px groove; BORDER-TOP: #ffffff 1px groove; FONT: 12px Verdana,Geneva,sans-serif; BORDER-LEFT: #ffffff 1px groove; WIDTH: 160px; COLOR: #000000; BORDER-BOTTOM: #ffffff 1px groove; HEIGHT: 18px; BACKGROUND-COLOR: #dff1f9" size=12 maxlength=8> 
                <a href="#" onClick=window.open('windowopen.asp?owid=DD_DWLB&forms=form1&formt=dwlb&formt2=dwlb2','','width=250,scrollbars=1,height=300')><img src="../images/open.gif" width="18" height="12" border="0"></a> 
                <INPUT name="dwlb2" type=hidden id="dwlb2" value="<%=dwlb2%>"></td>
            </tr>
            <tr>
              <td> </td>
              <td> </td>
            </tr>
            <tr>
              <td><div align="right">单位排名:</div></td>
              <td><input name="dwpm" value="<%=dwpm%>" type=text id="dwpm" style="BORDER-RIGHT: #ffffff 1px groove; BORDER-TOP: #ffffff 1px groove; FONT: 12px Verdana,Geneva,sans-serif; BORDER-LEFT: #ffffff 1px groove; WIDTH: 160px; COLOR: #000000; BORDER-BOTTOM: #ffffff 1px groove; HEIGHT: 18px; BACKGROUND-COLOR: #dff1f9" size=12 maxlength=2></td>
            </tr>
            <tr> 
              <td> </td>
              <td> </td>
            </tr>
            <tr> 
              <table align="center">
			  <td > <div align="center"> 
                  <INPUT type=submit value=' 提 交 ' name=Submitn OnClick="return check()" style="background-color: #DDDDDD; background-repeat: repeat; background-attachment: scroll; font-size: 9pt; height: 20; width: 50; border: 1px groove #000000; background-position: 0% 50%">
                  <INPUT name="reset" type=reset style="background-color: #DDDDDD; background-repeat: repeat; background-attachment: scroll; font-size: 9pt; height: 20; width: 50; border: 1px groove #000000; background-position: 0% 50%" value=' 取 消 '>
				  <INPUT type=submit value="查 询"  name=Submitx style="background-color: #DDDDDD; background-repeat: repeat; background-attachment: scroll; font-size: 9pt; height: 20; width: 50; border: 1px groove #000000; background-position: 0% 50%">
				  <INPUT type=submit value="新 增"  name=Submity style="background-color: #DDDDDD; background-repeat: repeat; background-attachment: scroll; font-size: 9pt; height: 20; width: 50; border: 1px groove #000000; background-position: 0% 50%">
				  </div></td>
			  </table>
            </tr>
          </table>
     </form>
        </div></td>
  </tr>
</table>
<%elseif action="suc" then%>
<table width="100%" border="0" cellspacing="0" cellpadding="0" >
  <tr>
    <td>
	<base target="main">
	<div align="center"><script>
	alert("<% =errn %>")
	if(confirm("您是否需要继续录入或修改同一编号的单位信息?"))
	{window.location="<%=aspname%>.asp?aspname=<%=aspname%>&bh=<%=bh%>&name=<%=name%>&xin=1"
	}
	
	else
	window.close
	  </script>
	</div></td>
  </tr>
</table>
<%end if%>
<script>
function check(){
    nr1=document.form1.dwmc.value; 
    if (nr1=="") {alert("单位名称不能为空!"); return(false);}
    nr1=document.form1.dwpm.value; 
    if (nr1=="") {alert("单位排名不能为空!"); return(false);}
    for (var i=0;i<nr1.length;i++){
	   if(nr1.charAt(i)<"0"  || nr1.charAt(i)>"9" ){
	       alert("单位排名必须是数字!");
		   return(false);
		   }
    }	
    return 1;
}
</script>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -