用<iframe></iframe>嵌入新页显示人员。
解决方案 »
- 想做个oracle网站上那种风格的菜单,鼠标滑过时有1个下拉框,里面可以放图片和分栏的链接
- 为何同样的combox 一个可以正常显示 一个却只显示id值??
- [分享] 增强jQuery.each方法
- document.getElementById()
- 如何让鼠标移到子层时,父层onmouseout事件不被触发?
- 输入框数据的验证问题
- 大侠们帮忙看一下这个Text怎么才能取到Select中的值呢?
- 如何将confirm框的默认焦点放到cancel上面?
- 在Web里调用一个Js函数时,传递的参数有多个单引号,结果出错了,为什么?
- 如何在页面离开网站时将Windows认证缓存删除?
- 如何在使用ActiveX控件的时候不出现安全提示框??
- 请问如何自动发送一封邮件?
无需提交表单。
下面是一个js的实例:<HTML><HEAD>
<META content="text/html; charset=gb2312" http-equiv=Content-Type>
<SCRIPT language="JavaScript">
subareaname206 = new Array;
subareaid206 = new Array;subareaname206[0]="长沙市";
subareaid206[0]="207";subareaname206[1]="湘潭市";
subareaid206[1]="208";subareaname206[2]="株洲市";
subareaid206[2]="209";subareaname222 = new Array;
subareaid222 = new Array;subareaname222[0]="广州市";
subareaid222[0]="223";subareaname222[1]="深圳市";
subareaid222[1]="228";subareaname222[2]="珠海市";
subareaid222[2]="229";var currlen=1;
function changearea(menuNum){
if (menuNum == "0"){
alert("您选择的地区有误!");
for (index=currlen;index>=0;index--){
document.inform.areaid.options[index] = null;
}
myoption= new Option("二类地区","0");
document.inform.areaid.options[0] = myoption;
} if (menuNum == "206"){
for (index=currlen;index>=0;index--){
document.inform.areaid.options[index] = null;
}
myoption= new Option("所有地区","0");
document.inform.areaid.options[0] = myoption;
for (index=0;index<subareaid206.length;index++){
myoption=new Option(subareaname206[index],subareaid206[index]);
document.inform.areaid.options[index+1] = myoption;
}
} if (menuNum == "222"){
for (index=currlen;index>=0;index--){
document.inform.areaid.options[index] = null;
}
myoption= new Option("所有地区","0");
document.inform.areaid.options[0] = myoption;
for (index=0;index<subareaid222.length;index++){
myoption=new Option(subareaname222[index],subareaid222[index]);
document.inform.areaid.options[index+1] = myoption;
}
} document.inform.areaid.selectedIndex=0;
currlen=index-1;
}
</SCRIPT><BODY>
<TABLE border=1 width=200>
<FORM action=search.asp method=post name=inform>
<TR>
<TD width=77>
<P align=center>
<SELECT class=input name=areapid
onchange=changearea(this.options[this.selectedIndex].value);>
<OPTION selected value=0>一类地区</OPTION>
<OPTION value=206>湖南省</OPTION>
<OPTION value=222>广东省</OPTION>
</SELECT>
</P>
</TD>
<TD width=178>
<P align=center>
<SELECT class=input name=areaid>
<OPTION selected
value=0>二类地区</OPTION>
</SELECT>
</P>
</TD>
</TR>
</FORM>
</TABLE>
</BODY></HTML>
我对这个大概比较清楚,但我的Dept是从数据库中取的(用户随时可以添加和删除),不能挨个写if语句来判断,也就是我所说的不能写死,还请再考虑有否别的办法.
我对这个大概比较清楚,但我的Dept是从数据库中取的(用户随时可以添加和删除),不能挨个写if语句来判断,也就是我所说的不能写死,还请再考虑有否别的办法.
还有个问题,好像不能加分了,若有别的有价值回复我可以通过别的方法给分,还请各位帮忙
你的方法怎么样,快点发过来吧,分我都给了