asfman
android developer
posts - 90,  comments - 213,  trackbacks - 0
<style>
select {
width:80px;
padding:0px;
margin:0px;
background:#000;
color:#fff;
}
</style>
<script>
function ww() {
 switch (document.form1.select1.value) {
  case "" :
      var pp=new Array("");
      break;
  case "a" :
 var pp = new Array("1","1","2","2","3","3","4","4","5","5","6","6","7","7","8","8","9","9","10","10");
 break;
  case "b" :
 var pp = new Array("11","11","12","12","13","13","14","14","15","15","16","16","17","17","18","18","19","19","20","20");
   break;
}
 document.form1.select2.options.length = 0;
 for(var i = 0; i <pp.length/2; i++) {
 document.form1.select2.options[i]=new Option(pp[i*2],pp[i*2+1]);
 if (document.form1.select2.options[i].value=="")
    document.form1.select2.selectedIndex =i;
 }
}
function ee() {
 for(var i = 0; i < document.form1.select1.options.length; i++) {
 if (document.form1.select1.options[i].value=="")
    document.form1.select1.selectedIndex = i;
 }
 ww();
}
onload=ee;
</script>
<body>
<form name="form1" method="post" action="" >
 <select name="select1" onchange="ww()">
 <option value="" selected="selected">请选译</option>
 <option value="a">a</option>
 <option value="b">b</option>
 </select>
 <select name="select2">
 </select>
</form>
</body>
posted on 2006-03-28 23:23 汪杰 阅读(524) 评论(0)  编辑 收藏 引用 所属分类: javascript
只有注册用户登录后才能发表评论。

<2006年7月>
2526272829301
2345678
9101112131415
16171819202122
23242526272829
303112345

常用链接

留言簿(15)

随笔分类(1)

随笔档案(90)

文章分类(727)

文章档案(712)

相册

收藏夹

http://blog.csdn.net/prodigynonsense

友情链接

最新随笔

搜索

  •  

积分与排名

  • 积分 - 467490
  • 排名 - 6

最新随笔

最新评论

阅读排行榜

评论排行榜