<script language="JavaScript" type="text/javascript">
var bigtype=[
["咨询","病历","会诊","转诊","..."],
["高血压","心脏病","脑卒中","..."],
];
var twotype=[
["专项档案","随访记录","用药记录","...."],
];
function getOne(){
//获得一类型下拉框的对象--门诊,慢病....
var sltseltype=document.form1.seltype;
//获得第一个子类下拉框的对象
var sltseltype_two=document.form1.seltype_two;
//得到对应一子类数组
var selbigtype=bigtype[sltseltype.selectedIndex - 1];
//清空第一子类,仅留提示选项
sltseltype_two.length=1;
//将第一个子类数组中的值填充到第一个子类下拉框中
for(var i=0;i<selbigtype.length;i++){
sltseltype_two[i+1]=new Option(selbigtype[i],selbigtype[i]);
}
//如果选择门诊,则清空第三个列表里的值.回到最初状态.
if(document.all.seltype.value=="mz")
{
document.form1.seltype_three.length=1;
}
}
function getTwo()
{
if(document.all.seltype.value=="mz")
{
document.form1.seltype_three.length=1;
}
else
{
//获得第二类型下拉框的对象
var sltseltype_twos=document.form1.seltype_two;
//获得第三个子类下拉框的对象
var sltseltype_three=document.form1.seltype_three;
//得到对应第二个子类数组
var seltwotype=twotype[sltseltype_twos.selectedIndex - 1];
//清空第三个子类,仅留提示选项
sltseltype_three.length=1;
//将第二个子类数组中的值填充到第三个子类下拉框中
for(var j=0;j<seltwotype.length;j++){
sltseltype_three[j+1]=new Option(seltwotype[j],seltwotype[j]);
}
}
}
</script>