最新下载
热门教程
- 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{
相关文章
- 《云顶之弈》S14赛季幻灵强袭厄斐琉斯阵容推荐 08-02
- BNB价格预测2025-2030:BNB价格会很快突破1000美元吗? 08-02
- 《云顶之弈》S14赛季核弹流可酷伯阵容推荐 08-02
- SUI价格逼近5美元大关:多头能否继续主导市场? 08-02
- 《龙息神寂》龙与地下城联动英雄奥玛抽取建议 08-02
- 卡尔达诺(ADA)8月2日价格预测 08-02