http://hi.baidu.com/quandafei/blog/item/816f9d2bf7eaa1fbe7cd4001.html
你要的是上面的这个意思?

解决方案 »

  1.   

    是这样吗?
    <body>
    A:<select id="a" size="5" multiple="multiple" style="width:200px">
    <option value="1">option_1</option>
    <option value="2">option_2</option>
    <option value="3">option_3</option>
    <option value="4">option_4</option>
    <option value="5">option_5</option>
    </select>
    &nbsp;&nbsp;
    B:<select id="b" size="5" multiple="multiple" style="width:200px"></select>
    <br />
    <input type="button" onclick="reto('a','b')" value=" >>B " style="margin-left:20px" />
    <input type="button" onclick="reto('b','a')" value=" A<< " style="margin-left:200px" />
    <script>
    function reto(source, destination){
    var s = document.getElementById(source), d = document.getElementById(destination);
    ins_ops(d, get_ops(s));
    } function get_ops(sel){ // 得到所选
    var ops = [];
    for(var i=0; i<sel.options.length; i++)
    if(sel.options[i].selected){
    ops.push(sel.options[i]);
    }
    return ops;
    } function ins_ops(sel, ops){ // 移动所选
    for(var i=0; i<ops.length; i++){
    sel.appendChild(ops[i]);
    }
    }
    </script>
    </body>
      

  2.   

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <HTML>
    <HEAD>
    <TITLE> 下拉框日常操作 </TITLE>
    <META NAME="Generator" CONTENT="EditPlus">
    <META NAME="Author" CONTENT="liangchao">
    <SCRIPT LANGUAGE="JavaScript">
    <!--
        function $(sId){return document.getElementById(sId)}
    window.onload = function(){
       $('leftSel').size = $('leftSel').options.length;
       $('rightSel').size = $('leftSel').options.length;
    }function changeOrd(sign){
       if(sign == 'right'){
          var Index = $('leftSel').options.selectedIndex;
        if(Index >= 0){
         var selText = $('leftSel').options[$('leftSel').selectedIndex].text;
         $('leftSel').options.remove(Index);
         $('rightSel').options.add(new Option(selText,selText))
        }else{
         alert('无选中选项');
        }
        
       }else if(sign == 'left'){
        var Index = $('rightSel').options.selectedIndex;
        if(Index >= 0){
         var selText = $('rightSel').options[$('rightSel').selectedIndex].text;
         $('rightSel').options.remove(Index);
         $('leftSel').options.add(new Option(selText,selText))
        }else{
         alert('无选中选项');
        }   
       }else if(sign == 'up'){
        var Index = $('leftSel').options.selectedIndex;
        if(Index > 0){
           var temp;
           temp = $('leftSel').options[$('leftSel').selectedIndex].text;
           $('leftSel').options[$('leftSel').selectedIndex].text = $('leftSel').options[$('leftSel').selectedIndex-1].text;
           $('leftSel').options[$('leftSel').selectedIndex-1].text = temp;
           $('leftSel').options[$('leftSel').selectedIndex-1].selected = true;
           }else{
          alert('已至最顶端!');
           }  
       }else if(sign == 'down'){
        var Index = $('leftSel').options.selectedIndex;
        if(Index < $('leftSel').options.length-1){
           var temp;
           temp = $('leftSel').options[$('leftSel').selectedIndex].text;
           $('leftSel').options[$('leftSel').selectedIndex].text = $('leftSel').options[$('leftSel').selectedIndex+1].text;
           $('leftSel').options[$('leftSel').selectedIndex+1].text = temp;
           $('leftSel').options[$('leftSel').selectedIndex+1].selected = true;
           }else{
          alert('已至最底端!');
           }  
       
       }
      
    }
    //-->
    </SCRIPT></HEAD><BODY>
    <SELECT NAME="left" id='leftSel' style="overflow:hidden;width:50px">
    <OPTION VALUE="中国">中国</option>
    <OPTION VALUE="英国">英国</option>
    <OPTION VALUE="法国">法国</option>
    <OPTION VALUE="日本">日本</option>
    <OPTION VALUE="俄国">俄国</option>
    <OPTION VALUE="德国">德国</option>
    </SELECT>
        <INPUT TYPE="button" value='右移' onclick="changeOrd('right')">
       <INPUT TYPE="button" value='上移' onclick="changeOrd('up')">
       <INPUT TYPE="button" value='下移' onclick="changeOrd('down')"><INPUT TYPE="button" value='左移' onclick="changeOrd('left')">   <SELECT NAME="rigth" id='rightSel' style="overflow:hidden;width:50px"></SELECT>
    </BODY>
    </HTML>
      

  3.   

    <TABLE id=YourId>
    <TR BGCOLOR="#FFFFFF">
    <td width="75">a</td>
    <td width=246>b</td>
    </tr>
    <TR BGCOLOR="#FFFFFF">
    <td width="75">aa</td>
    <td width=246>bb</td>
    </tr>
    <TR BGCOLOR="#FFFFFF">
    <td width="75">aaa</td>
    <td width=246>bbb</td>
    </tr>
    </TABLE> <FORM NAME="Form1">
       <INPUT TYPE="Button" NAME="Button1" VALUE="单击">
       <script for="Button1" EVENT="onClick" LANGUAGE="VBScript">
    dim t
    t=YourId.rows(0).cells(0).innerText
    YourId.rows(0).cells(0).innerText=YourId.rows(0).cells(1).innerText
    YourId.rows(0).cells(1).innerText=t


    t=YourId.rows(1).cells(0).innerText
    YourId.rows(1).cells(0).innerText=YourId.rows(1).cells(1).innerText
    YourId.rows(1).cells(1).innerText=t

    t=YourId.rows(2).cells(0).innerText
    YourId.rows(2).cells(0).innerText=YourId.rows(2).cells(1).innerText
    YourId.rows(2).cells(1).innerText=t
       </script>
    </FORM>