最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
列表框操作函数集合
时间:2008-01-18 编辑:简简单单 来源:一聚教程网
//描述: 添加不重复列表框元素
function selAdd( srcList, dstList )
{
var selectedIndex = new Array();
var count = 0;
for ( i=0; i
selectedIndex[count] = i;
count ++;
}
}
for ( j=0; j
k = selectedIndex[j];
if ( chkDup( srcList.options[k].value, dstList )==false ){
dstList.options.length++;
var len = dstList.options.length-1;
dstList.options[len].value = srcList.options[k].value;
dstList.options[len].text = srcList.options[k].text;
}
}
}
//描述: 删除列表框元素
function selDel( list )
{
var len = list.options.length;
var idx = 0;
while ( idx< len ){
if ( list.options[idx].selected ){
list.options.remove(idx);
len = list.options.length;
}
else{
-
下一个: 常用javascript函数(一)
相关文章
- wps使用函数的方法 07-04
- Python递归函数定义与用法 06-05
- 如何学会创建并调用函数 05-18
- golang 函数中函数和方法有什么区别 05-13
- python socket函数中,send与sendall有什么区别 怎么使用 05-11
- wps表格中怎么使用函数 使用方法 04-17