最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
列表框操作函数集合
时间:2022-06-30 09:50:30 编辑:袖梨 来源:一聚教程网
/* 列表框互相操作函数集 */
//描述: 添加不重复列表框元素
function selAdd( srcList, dstList )
{
var selectedIndex = new Array();
var count = 0;
for ( i=0; i if ( srcList.options[i].selected ){
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{
//描述: 添加不重复列表框元素
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{
相关文章
- 《夜族崛起》铁匠西里尔位置一览 05-17
- 《寓言之地》1.02更新内容一览 05-17
- 《辐射4》steam好评率介绍 05-17
- 《夜族崛起》技能强化珠宝掉落说明 05-17
- 《辐射4》主机控制台介绍 05-17
- 《星露谷物语》海草和绿藻获取方法 05-17