最新下载
热门教程
- 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{
相关文章
- 魔法少女小圆手游必杀技强化建议 圆哆啦角色养成系统介绍 07-15
- 魔法少女小圆手游心之器怎么解锁 圆哆啦角色养成系统介绍 07-15
- 币安Binance交易所官网登陆网址 币安Binance最新官方页面 07-15
- 最温暖的情话 七夕情话最暖心短句 07-15
- 魔兽世界光铸武器大剑幻化怎么获得-光铸武器大剑幻化获取方法 07-15
- 魔法少女小圆手游魔力解放有什么用 圆哆啦角色养成系统介绍 07-15