<div class="codetitle"> <span><a style="CURSOR: pointer" data="57098" class="copybut" id="copybut57098" onclick="doCopy('code57098')"><u>코드 복사</u></a></span> 코드는 다음과 같습니다.</div> <div class="codebody" id="code57098"> <br><script 언어="javascript"><br><br> /* 목록 상자 상호 운용성 함수 세트*/<br><br> //설명: 고유한 목록 상자 요소 추가<br> 함수 selAdd( srcList, dstList )<br> {<br> var selectedIndex = new Array();<br> var count = 0;<br><br> for ( i=0; i<srcList.options.length ; I ) {<br> <br> if (srclist.options [i] .select) {<br> <br> selectindindex [count] = i <BR> 개수 <br> <br>} <BR> } < <> <or> for (j = 0; j & lt; selectindindex.length; j) {<br> 🎜> k = selectDindex [j] <br> <br> if (chkdup (srclist.Options [k ] .value, dstList )==false ){<br> > <br> }<br><BR> }<BR><BR> //설명: 목록 상자 요소 삭제<BR> function selDel( list )<BR> {<br> var len = list.options.length;<br> var idx = 0;<br><br> while ( idx< len ){<br><br> if ( list.options[idx].selected ){<BR> list.options.remove(idx); <BR> len = list.options.length;<BR> list )<BR> {<br> for ( i=0; i<list.options.length; i ){<br> //alert( item " - " list.options[i].value );<br> if ( 항목 == list.options[i].value ){<br> return true; 전체 구성원<BR> 기능 selSel( 목록, 항목 )<BR> {<BR> item.value = " ";<BR> for ( i=0; i<list.options.length; i ){<BR> list .options[i].selected=true;<BR> 항목 .value = list.options[i].value " ";<BR> }<BR><br> }<br><BR> function selSelSingle( list, value )<BR> {<BR> for ( i=0 ; i<list.options.length; i ){<BR> if ( list.options[i].value == value ){<BR> list.options [i].selected=true;<BR> break;<BR> <描述 描述 // 🎜 : 根据数组初始化列表框 <🎜 🎜> Function Sellist (Item, Arr) <🎜 {<BR> <🎜 🎜 var curindex, insindex, val, text; <🎜 var arritem = new Array (새로운 배열) );<BR><BR> if ( item ){<br><br> item.length = 0;<BR> curIndex = 0;<br><br> for ( i=0; i<arr.length; i ){<br><br> item.length ;<BR> insIndex = item.length - 1;<br><br> if ( arr[i] ){<br> arrItem = arr[ 나].분할( ", " );<br> text = arrItem[1];<BR> val = arrItem[0];<br> item.options[ insIndex ].text = text; <br> item.options[ insIndex ].value= val;<BR> }<BR> }<BR><BR> }<BR>} <BR><BR> </script><br><br> </div>