如何动态追加组合框列表?

如何动态追加组合框列表?
除了在onload事件中写:
document.forms[0].tmpPersonList.add(new Option("cb","cb/testoa"));
以外还有其他什么办法?
[124 byte] By [cbice2004-沉默的骑士] at [2008-1-9]
# 1
try{
var obj = document.all["tmpPersonList"];
var i = 0 ;
var newFileName = new Option("cb","cb/testoa")) ;
obj.options[i++] = newFileName ;
//............
//............
//............后面的自己根据你的需求写了!兄弟随手给你写的。
}
//出错处理
catch (e){
alert(e.description) ;
}
qiuyang666-心雪峰 at 2007-10-17 > top of Msdn China Tech,企业开发,Lotus...
# 2
谢谢楼上的,好象和我的差不多.
我现在有个方法:
在组合框里,为选项选择公式:
@DbLookup("" : "NoCache" ; ResideServer : DbFile; "(V/Search/Org/Unit2AllByName)" ; "公司领导" ; 4 )+"|"+@DbLookup("" : "NoCache" ; ResideServer : DbFile; "(V/Search/Org/Unit2AllByName)" ; "公司领导" ; 3 )
修改为
@DbLookup("" : "NoCache" ; ResideServer : DbFile; "(V/Search/Org/Unit2AllByName)" ; "公司领导" ; 4 ):"cbb":"gff"+"|"+@DbLookup("" : "NoCache" ; ResideServer : DbFile; "(V/Search/Org/Unit2AllByName)" ; "公司领导" ; 3 ):"cbb/testoa":"gff/testoa"
这样组合框下拉列表新追加两个人员,分别为cbb和gff.
这也是方法之一.结萜
cbice2004-沉默的骑士 at 2007-10-17 > top of Msdn China Tech,企业开发,Lotus...