我做的选择下拉框有问题有人帮忙看看嘛代码那出错了
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html>
<head>
<title>JS联动下拉框</title>
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta name="Originator" content="Microsoft Visual Studio .NET 7.1">
<script language="javascript" >
/*
** ==================================================================================================
** 类名:选择器
** 功能:嘟嘟网络陷阱属性分类选择器
**
** 作者:嘟嘟小新
** ==================================================================================================
**/
function CLASS_LIANDONG_YAO(array)
{
//数组,联动的数据源
this.array=array;
this.indexName='';
this.obj='';
//设置子SELECT
// 参数:当前onchange的SELECT ID,要设置的SELECT ID
this.subSelectChange=function(selectName1,selectName2)
{
//try
//{
var obj1=document.all[selectName1];
var obj2=document.all[selectName2];
var objName=this.toString();
var me=this;
obj1.onchange=function()
{
me.optionChange(this.options[this.selectedIndex].value,obj2.id)
}
}
//设置第一个SELECT
// 参数:indexName指选中项,selectName指select的ID
this.firstSelectChange=function(indexName,selectName)
{
this.obj=document.all[selectName];
this.indexName=indexName;
this.optionChange(this.indexName,this.obj.id)
}
// indexName指选中项,selectName指select的ID
this.optionChange=function (indexName,selectName)
{
var obj1=document.all[selectName];
var me=this;
obj1.length=0;
obj1.options[0]=new Option("请在次选择器中选择你要发布的游戏资源属性分类",'');
for(var i=0;i<this.array.length;i++)
{
if(this.array[i][1]==indexName)
{
//alert(this.array[i][1]+" "+indexName);
obj1.options[obj1.length]=new Option(this.array[i][2],this.array[i][0]);
}
}
}
}
</script>
</head>
<body>
<form name="form1" method="post">
<SELECT ID="s1" NAME="s1" >
<OPTION selected></OPTION>
</SELECT>
<SELECT ID="s2" NAME="s2" >
<OPTION selected></OPTION>
</SELECT>
<SELECT ID="s3" NAME="s3">
<OPTION selected></OPTION>
</SELECT>
<br>
<br><br>
</SELECT>
</form>
</body>
<script language="javascript">
//--嘟嘟网络陷阱分类-----------------------------------------------------------
//数据源
var array=new Array();
array[0]=new Array("网络欺诈","根目录","网络欺诈"); //数据格式 ID,父级ID,名称
array[1]=new Array("网络沉迷","根目录","网络沉迷");
array[2]=new Array("网络犯罪","根目录","网络犯罪");
array[3]=new Array("弹出网页","根目录","弹出网页");
array[4]=new Array("五味网瘾","根目录","五味网瘾");
array[5]=new Array("其它网危","根目录","其它网危");
array[6]=new Array("网上购物","网络欺诈","网上购物");
array[7]=new Array("问题网站","网络欺诈","问题网站");
array[8]=new Array("免费诱惑","网络欺诈","免费诱惑");
array[9]=new Array("网络聊天","网络欺诈","网络聊天");
array[10]=new Array("其它欺诈","网络欺诈","其它欺诈");
array[11]=new Array("网络游戏","网络沉迷","网络游戏");
array[12]=new Array("上网扮酷","网络沉迷","上网扮酷");
array[13]=new Array("影音娱乐","网络沉迷","影音娱乐");
array[14]=new Array("聊天交友","网络沉迷","聊天交友");
array[15]=new Array("其它沉迷","网络沉迷","其它沉迷");
array[16]=new Array("网瘾犯罪","网络犯罪","网瘾犯罪");
array[17]=new Array("为钱犯罪","网络犯罪","为钱犯罪");
array[18]=new Array("模仿犯罪","网络犯罪","模仿犯罪");
array[19]=new Array("虚荣犯罪","网络犯罪","虚荣犯罪");
array[20]=new Array("其它犯罪","网络犯罪","其它犯罪");
array[21]=new Array("网络缘分测试","弹出网页","网络缘分测试");
array[22]=new Array("个性艺术签名","弹出网页","个性艺术签名");
array[23]=new Array("腾讯 QQ 靓号","弹出网站","腾讯 QQ 靓号");
array[24]=new Array("激情美女聊天","弹出网页","激情美女聊天");
array[25]=new Array("其它弹出网页","弹出网页","其它弹出网页");
array[26]=new Array("迷茫网瘾","五味网瘾","迷茫网瘾");
array[27]=new Array("无助网瘾","五味网瘾","无助网瘾");
array[28]=new Array("贪婪网瘾","五味网瘾","贪婪网瘾");
array[29]=new Array("游戏网瘾","五味网瘾","游戏网瘾");
array[20]=new Array("其它网瘾","五味网瘾","其它网瘾");
array[21]=new Array("其它网危","其它网危","其它网危");
array[22]=new Array("网上摘录","网上购物","网上摘录");
array[23]=new Array("原创资源","网上购物","原创资源");
array[24]=new Array("网上摘录","问题网站","网上摘录");
array[25]=new Array("原创资源","问题网站","原创资源");
array[26]=new Array("网上摘录","免费诱惑","网上摘录");
array[27]=new Array("原创资源","免费诱惑","原创资源");
array[28]=new Array("网上摘录","网络聊天","网上摘录");
array[29]=new Array("原创资源","网络聊天","原创资源");
array[30]=new Array("网上摘录","其它欺诈","网上摘录");
array[31]=new Array("原创资源","其它欺诈","原创资源");
array[32]=new Array("网上摘录","网络游戏","网上摘录");
array[33]=new Array("原创资源","网络游戏","原创资源");
array[34]=new Array("网上摘录","上网扮酷","网上摘录");
array[35]=new Array("原创资源","上网扮酷","原创资源");
array[36]=new Array("网上摘录","影音娱乐","网上摘录");
array[37]=new Array("原创资源","影音娱乐","原创资源");
array[38]=new Array("网上摘录","聊天交友","网上摘录");
array[39]=new Array("原创资源","聊天交友","原创资源");
array[40]=new Array("网上摘录","其它沉迷","网上摘录");
array[41]=new Array("原创资源","其它沉迷","原创资源");
array[42]=new Array("网上摘录","网瘾犯罪","网上摘录");
array[43]=new Array("原创资源","网瘾犯罪","原创资源");
array[44]=new Array("网上摘录","为钱犯罪","网上摘录");
array[45]=new Array("原创资源","为钱犯罪","原创资源");
array[46]=new Array("网上摘录","模仿犯罪","网上摘录");
array[47]=new Array("原创资源","模仿犯罪","原创资源");
array[48]=new Array("网上摘录","模仿犯罪","网上摘录");
array[49]=new Array("原创资源","模仿犯罪","原创资源");
array[50]=new Array("网上摘录","其它犯罪","网上摘录");
array[51]=new Array("原创资源","其它犯罪","原创资源");
array[52]=new Array("网上摘录","网络缘分测试","网上摘录");
array[53]=new Array("原创资源","网络缘分测试","原创资源");
array[54]=new Array("网上摘录","个性艺术签名","网上摘录");
array[55]=new Array("原创资源","个性艺术签名","原创资源");
array[56]=new Array("网上摘录","腾讯 QQ 靓号","网上摘录");
array[57]=new Array("原创资源","腾讯 QQ 靓号","原创资源");
array[58]=new Array("网上摘录","激情美女聊天","网上摘录");
array[59]=new Array("原创资源","激情美女聊天","原创资源");
array[60]=new Array("网上摘录","其它弹出网页","网上摘录");
array[61]=new Array("原创资源","其它弹出网页","原创资源");
array[62]=new Array("网上摘录","迷茫网瘾","网上摘录");
array[63]=new Array("原创资源","迷茫网瘾","原创资源");
array[64]=new Array("网上摘录","无助网瘾","网上摘录");
array[65]=new Array("原创资源","无助网瘾","原创资源");
array[66]=new Array("网上摘录","贪婪网瘾","网上摘录");
array[67]=new Array("原创资源","贪婪网瘾","原创资源");
array[68]=new Array("网上摘录","游戏网瘾","网上摘录");
array[69]=new Array("原创资源","游戏网瘾","原创资源");
array[70]=new Array("网上摘录","其它网瘾","网上摘录");
array[71]=new Array("原创资源","其它网瘾","原创资源");
array[72]=new Array("网上摘录","其它网危","网上摘录");
array[73]=new Array("原创资源","其它网危","原创资源");
//--------------------------------------------
//这是调用代码
var liandong=new CLASS_LIANDONG_YAO(array) //设置数据源
liandong.firstSelectChange("根目录","s1"); //设置第一个选择框
liandong.subSelectChange("s1","s2"); //设置子级选择框
liandong.subSelectChange("s2","s3");
</script>
</html>
-------------------------------------------------------------------------------------------------------------------------------------------
在以上代码中网络犯罪里的其它犯罪不显示,只显示前四个网瘾犯罪 为钱犯罪 模仿犯罪 模仿犯罪,
在后面的弹出网页选择框页显示不正常后面的几乎都不正常谁能帮忙调试下,弹出网页应该后面是
网络缘分测试 个性艺术签名 腾讯 QQ 靓号 激情美女聊天 其它弹出网页可是都不显示,这是怎么回事啊???
我检查了没错误啊,怎么显示不正常