求实现动态下拉菜单选项代码!~ 如题~ 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 html> <title>select</title> <head> <script language = "JavaScript">var onecount;onecount=0;subcat = new Array();subcat[0] = new Array("1","A","选项1的值");//array中第一个元素为二级菜单显示的选项,第二个元素为它上级选项的值,第三个元素为二级菜单本选项的值,下同subcat[1] = new Array("2","A","选项2的值");subcat[2] = new Array("3","A","选项3的值");subcat[3] = new Array("4","A","选项4的值");subcat[4] = new Array("10","B","选项10的值");subcat[5] = new Array("20","B","选项20的值");subcat[6] = new Array("30","B","选项30的值");subcat[7] = new Array("40","B","选项40的值");subcat[8] = new Array("100","C","选项100的值");subcat[9] = new Array("200","C","选项200的值");subcat[10] = new Array("300","C","选项300的值");onecount=11;</script><script language = "JavaScript">function changelocation(locationid) { document.form1.select2.length = 0; var locationid=locationid; var i; for (i=0;i < onecount; i++) { if (subcat[i][1] == locationid) { document.form1.select2.options[document.form1.select2.length] = new Option(subcat[i][0], subcat[i][2]); } } } </script><body > <form name="form1"><select style="width:90" name='select1' onChange='changelocation(document.form1.select1.options[document.form1.select1.selectedIndex].value)' size='1'> <option value=>请选择</option> <option value='A'>A</option> <option value='B'>B</option> <option value='C'>C</option></select><select name='select2' style="width:90"></select></form> </body> </html> html> <title>select</title> <head> <script language = "JavaScript">var onecount;onecount=0;subcat = new Array();subcat[0] = new Array("1","A","选项1的值");//array中第一个元素为二级菜单显示的选项,第二个元素为它上级选项的值,第三个元素为二级菜单本选项的值,下同subcat[1] = new Array("2","A","选项2的值");subcat[2] = new Array("3","A","选项3的值");subcat[3] = new Array("4","A","选项4的值");subcat[4] = new Array("10","B","选项10的值");subcat[5] = new Array("20","B","选项20的值");subcat[6] = new Array("30","B","选项30的值");subcat[7] = new Array("40","B","选项40的值");subcat[8] = new Array("100","C","选项100的值");subcat[9] = new Array("200","C","选项200的值");subcat[10] = new Array("300","C","选项300的值");onecount=11;</script><script language = "JavaScript">function changelocation(locationid) { document.form1.select2.length = 0; var locationid=locationid; var i; for (i=0;i < onecount; i++) { if (subcat[i][1] == locationid) { document.form1.select2.options[document.form1.select2.length] = new Option(subcat[i][0], subcat[i][2]); } } } </script><body > <form name="form1"><select style="width:90" name='select1' onChange='changelocation(document.form1.select1.options[document.form1.select1.selectedIndex].value)' size='1'> <option value=>请选择</option> <option value='A'>A</option> <option value='B'>B</option> <option value='C'>C</option></select><select name='select2' style="width:90"></select></form> </body> </html> 文件上传后提示信息国际化 想用java写个音乐网站 小弟帖个简历 进来看看给点建议,感激不尽 (40分) 请教大家个关于服务器和编程工具的问题(急,谢谢) 出错提示! 帮忙看看 求一个工作日程表组件 hibernate如何读取blob数据? JSP中的全文检索(经典) 帮忙看看这个连接池,是不是有问题,我log的时候说的物理连接数为什么会超出我配置文件里的最大连接数,欢迎讨论! 循环处理文件,并更新Web数据 dwr3.0 和jdk1.4合用老是出错,下载了一个dwr-jdk14.jar ,还是报错 求个JS代码 实现此功能.
<title>select</title>
<head>
<script language = "JavaScript">
var onecount;
onecount=0;
subcat = new Array();
subcat[0] = new Array("1","A","选项1的值");//array中第一个元素为二级菜单显示的选项,第二个元素为它上级选项的值,第三个元素为二级菜单本选项的值,下同
subcat[1] = new Array("2","A","选项2的值");
subcat[2] = new Array("3","A","选项3的值");
subcat[3] = new Array("4","A","选项4的值");
subcat[4] = new Array("10","B","选项10的值");
subcat[5] = new Array("20","B","选项20的值");
subcat[6] = new Array("30","B","选项30的值");
subcat[7] = new Array("40","B","选项40的值");
subcat[8] = new Array("100","C","选项100的值");
subcat[9] = new Array("200","C","选项200的值");
subcat[10] = new Array("300","C","选项300的值");
onecount=11;
</script>
<script language = "JavaScript">
function changelocation(locationid)
{
document.form1.select2.length = 0; var locationid=locationid;
var i;
for (i=0;i < onecount; i++)
{
if (subcat[i][1] == locationid)
{
document.form1.select2.options[document.form1.select2.length] = new Option(subcat[i][0], subcat[i][2]);
}
}
}
</script>
<body > <form name="form1">
<select style="width:90" name='select1' onChange='changelocation(document.form1.select1.options[document.form1.select1.selectedIndex].value)' size='1'>
<option value=>请选择</option>
<option value='A'>A</option>
<option value='B'>B</option>
<option value='C'>C</option></select>
<select name='select2' style="width:90">
</select></form>
</body>
</html>
<title>select</title>
<head>
<script language = "JavaScript">
var onecount;
onecount=0;
subcat = new Array();
subcat[0] = new Array("1","A","选项1的值");//array中第一个元素为二级菜单显示的选项,第二个元素为它上级选项的值,第三个元素为二级菜单本选项的值,下同
subcat[1] = new Array("2","A","选项2的值");
subcat[2] = new Array("3","A","选项3的值");
subcat[3] = new Array("4","A","选项4的值");
subcat[4] = new Array("10","B","选项10的值");
subcat[5] = new Array("20","B","选项20的值");
subcat[6] = new Array("30","B","选项30的值");
subcat[7] = new Array("40","B","选项40的值");
subcat[8] = new Array("100","C","选项100的值");
subcat[9] = new Array("200","C","选项200的值");
subcat[10] = new Array("300","C","选项300的值");
onecount=11;
</script>
<script language = "JavaScript">
function changelocation(locationid)
{
document.form1.select2.length = 0; var locationid=locationid;
var i;
for (i=0;i < onecount; i++)
{
if (subcat[i][1] == locationid)
{
document.form1.select2.options[document.form1.select2.length] = new Option(subcat[i][0], subcat[i][2]);
}
}
}
</script>
<body > <form name="form1">
<select style="width:90" name='select1' onChange='changelocation(document.form1.select1.options[document.form1.select1.selectedIndex].value)' size='1'>
<option value=>请选择</option>
<option value='A'>A</option>
<option value='B'>B</option>
<option value='C'>C</option></select>
<select name='select2' style="width:90">
</select></form>
</body>
</html>