0

JS操作 SELECT和OPTION

Posted in JavaScript at 三月 26th, 2010 / No Comments »

删除select中的所有OPTION

document. getElementById_r(“select的ID”).options.length = 0;

为select添加一个option

document. getElementById_r(“select的ID”).options.add(new Option(text,value));

移除一个指定的OPTION

document. getElementById_r(“select的ID”).remove(i);

Published in JavaScript
Tags:

No Responses to “JS操作 SELECT和OPTION”

Leave a Reply

请输入算式结果(看不清请点击图片)
(必须)