|
我就是想要实现不同的用户登陆,二级联动菜单中只显示与它相关的信息,无关的不显示,不知道我说的是否清楚?
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="conn_fj16.asp" -->
<!--#include file="admin_qx.asp" -->
<% issjcz %>
<html>
<head>
<title>奶牛数量</title>
<style>
body,select
{
font-size:9pt;
font-family:Verdana;
}
a
{
color:red;
text-decoration:none;
}
a:hover{
text-decoration:underline;
}
.style5 {color: #000000}
.STYLE6 {
font-size: 12pt;
font-weight: bold;
}
body {
background-color: #d6dff7;
}
</style>
<body>
<%xiangzhen=session("xiangzhen") %>
<form id="form1" name="form1" method="post" action="nainiushuliang_add_save.asp">
<SCRIPT LANGUAGE="JavaScript">
<!--
function Dsy()
{
this.Items = {};
}
Dsy.prototype.add = function(id,iArray)
{
this.Items[id] = iArray;
}
Dsy.prototype.Exists = function(id)
{
if(typeof(this.Items[id]) == "undefined") return false;
return true;
}
function change(v){
var str="0";
for(i=0;i<v;i++){ str+=("_"+(document.getElementById(s[i]).selectedIndex-1));};
var ss=document.getElementById(s[v]);
with(ss){
length = 0;
options[0]=new Option(opt0[v],opt0[v]);
if(v && document.getElementById(s[v-1]).selectedIndex>0 || !v)
{
if(dsy.Exists(str)){
ar = dsy.Items[str];
for(i=0;i<ar.length;i++)options[length]=new Option(ar[i],ar[i]);
if(v)options[1].selected = true;
}
}
if(++v<s.length){change(v);}
}
}
var dsy = new Dsy();
a="安徽",b="北京",c="福建",d="甘肃";
a1="安庆",a2="蚌埠"
b1="北京"
if (a=xiangzhen)
{b="";c="";d="";
}
dsy.add("0",["a","b","c","d"]);
dsy.add("0_0",["a1","a2",]);
dsy.add("0_1",["b1"]);
//-->
</SCRIPT>
<SCRIPT LANGUAGE = JavaScript>
<!--
//** Power by Fason(2004-3-11)
//** Email:fason_pfx@hotmail.com
var s=["s1","s2","s3"];
var opt0 = [" "," "];
function setup()
{
for(i=0;i<s.length-1;i++)
document.getElementById(s[i]).onchange=new Function("change("+(i+1)+")");
change(0);
}
//-->
</SCRIPT>
</head>
<body bgcolor="#E0E0E0" onload="setup()">
<form name="frm">
<p> </p>
<table width="884" border="0" cellpadding="2" cellspacing="2" bordercolor="#F3F3F3">
<!--DWLayoutTable-->
<tr>
<td height="44" colspan="2" align="right" valign="bottom" bordercolor="#999999"><div align="center" class="STYLE6">乡镇办场奶牛数量统计表</div></td>
</tr>
<tr>
<td height="45" align="right" valign="bottom" bordercolor="#999999">日期:</td>
<td width="455" align="left" valign="bottom" bordercolor="#999999"><span class="time style5">
<select name="byear" size="1" class="put" id="select14">
<option value=""> </option>
<%for i=year(date) to 2050 step 1%>
<option value="<%=i%>"><%=i%></option>
<%next%>
</select>
年
<select name="bmonth" size="1" class="put" id="select15">
<option value=""> </option>
<%for i=1 to 12%>
<option value="<%=i%>"><%=i%></option>
<%next%>
</select>
月</span></td>
</tr>
<tr>
<td width="415" height="45" align="right" valign="bottom" bordercolor="#999999">地点:</td>
<td align="left" valign="bottom" bordercolor="#999999"><select name="xiangzhen" size="1" id="s1">
</select>
<span class="time style5">
<select name="cun" size="1" id="s2">
</select>
</span></td>
</tr>
<tr>
<td height="45" align="right" valign="bottom" bordercolor="#999999">奶牛头数:</td>
<td align="left" valign="bottom" bordercolor="#999999"><input name="shuliang" type="text" id="shuliang" size="15">
头</td>
</tr>
</table>
<p align="center"> </p>
<p align="center">
<input type="submit" name="Submit" value="添加记录" style="width:120;background-color: #FFCC66; color: #000000; border: 1 solid #000000" />
</p>
</form>
</body>
</html> |
|