---
title: "javascript控制select控件"
author: "microapple"
date: "2011-04-11T11:14:15Z"
tags: []
categories: ["编程语言"]
slug: "javascript-select"
draft: false
lastmod: "2013-03-02T11:24:28Z"
id: 997126
url: "https://microapple.iteye.com/blog/997126"
---

options集合的这几个方法： 
1.options.add(option)方法向集合里添加一项option对象； 
2.options.remove(index)方法移除options集合中的指定项； 
3.options(index)或options.item(index)可以通过索引获取options集合的指定项；

设置select中某个Item为选中
   document.all.objSelect.value = objItemValue;
设置select中当前选中项的value
   var currSelectValue = document.all.objSelect.value;