- »ç¿ë¹æ¹ýÀº °£´ÜÇÕ´Ï´Ù. µ¥¸ð¸¦ º¸½Ã¸é ºÎ¿©¹ÞÁö ¾ÊÀº ±ÇÇÑ°ú ºÎ¿©¹ÞÀº ±ÇÇÑ ÀÎ select box·Î ³ª´²Á®ÀÖ½À´Ï´Ù.
- ºÎ¿©¹ÞÁö ¾ÈÀº ±ÇÇÑ ¹öÆ° ÇÏ´Ü¿¡ ÀÖ´Â ¾²±â, Àбâ, ¼öÁ¤, »èÁ¦°¡ Àִµ¥¿ä
¸¶¿ì½º·Î ¼±ÅÃÇϽŴÙÀ½ Áß°£¿¡ ¿À¸¥À¸·Î À̵¿À̶õ ¹öÆ°ÀºÀ» Ŭ¸¯ÇÕ´Ï´Ù.
- ºÎ¿©¹ÞÁö ¾ÈÀº ±ÇÇÑ¿¡ ÀÖ´ø ¾²±â¹öÆ°ÀÌ ºÎ¿©¹ÞÀº ±ÇÇÑÀ¸·Î À̵¿ÇÏ°Ô µË´Ï´Ù.
- ÀÚ ÀÌÁ¦ ¸· ¿È°Üº½´Ï´Ù. ºÎ¿©¹ÞÀº ±ÇÇÑÀÌµç ºÎ¿©¹ÞÁö ¾ÈÀº ±ÇÇÑÀÌµç ¾çÂÊÀ¸·Î »çÁ¤¾øÀÌ À̵¿ÀÌ µÇ´Â±º¿ä.
- ÀÌÁ¦ Àüü¼±ÅÃÇϼż À̵¿ÀÌ µÇ´ÂÁö Çѹø Çغ¾½Ã´Ù.
- µÇ´Â±º¿ä ^^
*¾Æ·¡ºÎºÐÀº À§ ÀÚ¹Ù½ºÅ©·¦Æ®ÀÇ ¼Ò½ºÀÔ´Ï´Ù.
<html> <head><title>Select tag¿¡ ÀÖ´Â OPTION tag¸¦ ´Ù¸¥ SELECT tag·Î ¿Å±â±â</title> <script language="JavaScript"> <!-- function moveLeft(obj) { //alert('select2 equal '+obj.id); for(var i=obj.options.length - 1;i>=0;i--) { if(obj.options[i].selected) { //alert(obj.options[i].text+' is selected!'); //alert('select1 :'+select1); var oOption = document.createElement("OPTION"); select1.options.add(oOption); oOption.innerText=obj.options[i].text; obj.options[i]=null; } } }
function moveRight(obj) { //alert(' select1 equal '+obj.id); for(var i=obj.options.length - 1;i>=0;i--) { if(obj.options[i].selected) { //alert(obj.options[i].text+' is selected!'); //alert('select2 :'+select2); var oOption = document.createElement("OPTION"); select2.options.add(oOption); oOption.innerText=obj.options[i].text; obj.options[i]=null; } } } //--> </script>
</head>
<body>
<table> <tr> <td>ºÎ¿©¹ÞÁö¾ÈÀº±ÇÇÑ</td> <td>¹öÆ°</td> <td>ºÎ¿©¹ÞÀº±ÇÇÑ</td> </tr> <tr> <td valign="top"><select name="select1" id="select1" multiple="yes" size="10" style="width=100;"> <option>¾²±â</option> <option>Àбâ</option> <option>¼öÁ¤</option> <option>»èÁ¦</option> </select> </td> <td valign="center"><input type="button" value="¿À¸¥À¸·ÎÀ̵¿" onClick="moveRight(select1)"><br> <input type="button" value="¿ÞÂÊÀ¸·ÎÀ̵¿" onClick="moveLeft(select2)"> </td> <td valign="top"><select name="select2" id="select2" multiple="yes" size="10" style="width=100;" >
</select></td> </tr> </table>
</body> </html>
|