jquery select 다 중 선택 상자 의 좌우 이동 구체 적 인 구현 코드
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml">
<head> 
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> 
<title>     </title> 
<script type="text/javascript" src="jquery-1.4.4.min.js"></script> 
<script type="text/javascript"> 
/**  
 *                 
 *                      
 */ 
$(document).ready(function(){  
    for(var i=1;i<=5;i++)  
    {  
    $("#fb_list").append("<option value='"+i+"'>         00"+i+"</option>");   
    }  
})  
$(function(){  
  $("#add").click(function(){  
       if($("#fb_list option:selected").length>0)  
       {  
           $("#fb_list option:selected").each(function(){  
              $("#select_list").append("<option value='"+$(this).val()+"'>"+$(this).text()+"</option");  
              $(this).remove();   
           })  
       }  
       else 
       {  
           alert("         !");  
       }  
   })  
})  
$(function(){  
      $("#delete").click(function(){  
           if($("#select_list option:selected").length>0)  
           {  
               $("#select_list option:selected").each(function(){  
                     $("#fb_list").append("<option value='"+$(this).val()+"'>"+$(this).text()+"</option");  
                     $(this).remove();   
               })  
           }  
           else 
           {  
               alert("         !");  
           }  
     })  
}) 
</script> 
</head> 
<body> 
<table width="95%" cellpadding="0" align="center" class="listshow" border="1" cellspacing="0">  
<tr>  
  <td colspan="4" align="center">    </td>  
  </tr>  
<tr>  
 <td class="black" width="30%" align="center" height="150">  
 <select id="fb_list" multiple="multiple" style="text-align:center;width:300px;height:150px;"></select>   
 </td>  
  <td align="center" width="5%">  
    <input type="button" id="add" value="  >>" />  
      <br/>  
      <br/>  
      <input type="button" id="delete" value="<<  " />  
    </td>  
    <td class="black" width="30%" align="center">  
    <select id="select_list" multiple="multiple" style=" text-align:center;width:300px;height:150px;"></select>  
    </td>  
</tr>  
</table> 
</body> 
</html> 
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
🕗[프로그래머스] 입양 시각 구하기(2)문제 설명 ANIMAL_OUTS 테이블은 동물 보호소에서 입양 보낸 동물의 정보를 담은 테이블입니다. ANIMAL_OUTS 테이블 구조는 다음과 같으며, ANIMAL_ID, ANIMAL_TYPE, DATETIME, ...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.