关于二联菜单,请帮忙找错.

feixuejian881 2003-08-18 05:01:16
源程序如下,二级菜单没用
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>List</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"></head>
<body>
<script LANGUAGE="javascript">
<!--
var onecount;
onecount=0;

subcat = new Array();
subcat[0] = new Array("攻击","01","001");
subcat[1] = new Array("防御","01","002");
subcat[2] = new Array("觅食","01","003");
subcat[3] = new Array("贮食","01","004");
subcat[4] = new Array("繁殖","01","005");
subcat[5] = new Array("社群","01","006");
subcat[6] = new Array("通信","01","007");
subcat[7] = new Array("节律","01","008");
subcat[8] = new Array("本能","01","009");
subcat[9] = new Array("巴浦洛夫","02","010");
subcat[10] = new Array("珍妮特","02","011");
subcat[11] = new Array(""覆盖",02","012");
onecount=12;

function changelocation(locationid)
{
document.myform.smalllocation.length = 0;

var locationid=locationid;
var i;
document.myform.smalllocation.options[0] = new Option('====所有====','');
for (i=0;i < onecount; i++)
{
if (subcat[i][1] == locationid)
{
document.myform.smalllocation.options[document.myform.smalllocation.length] = new Option(subcat[i][0], subcat[i][2]);
}
}

}

//-->
</script>


<form name="myform" method="post">
<p>
<select name="biglocation" onChange="changelocation(document.myform.biglocation.options[document.myform.biglocation.selectedIndex].value)">
<option value="01">文字</option>
<option value="01">图片</option>
<option value="01">音像</option>
<option value="02">科学家<option>
</select>
<select name="smalllocation">
<option value="" selected>==所有==</option>
</select>
</p>
<p>
<input type="submit" name="Submit" value="Submit">
<input type="reset" name="Submit2" value="reset">
</p>
</form>
<script LANGUAGE="javascript">
<!--
changelocation(document.myform.biglocation.options[document.myform.biglocation.selectedIndex].value);
//-->
</script>
</body>
</html>




</body>
</html>
...全文
30 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
marry7 2003-08-18
  • 打赏
  • 举报
回复
你提别的问题后可以让帮助你的人链到这里另给分了:)
我总遇到这样的事情,不过没有更改,删除帖子的权利啊:)
feixuejian881 2003-08-18
  • 打赏
  • 举报
回复
问题自己解决了!不好意思,书写错误。分给不出去了,再提一个吧,好把分给掉啊,50分啊!
feixuejian881 2003-08-18
  • 打赏
  • 举报
回复
up

28,390

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧