懒码农。。。。。。

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::
Code

 

 

select元素的 .options.length = 0 会清空其下所有option

                  .options.add(new option(optiontext,optionvalue))    增加一个option

                  .options[元素编号].selected == true   判断该option是否被选中

 

可以多选的select:

<select id="..." name="..." size="10" multiple="multiple" ><option value="...">...</option></select>

 

posted on 2009-04-16 00:19  阿彬  阅读(510)  评论(0编辑  收藏  举报