<div class="htmlarea"> <textarea id="runcode96609"> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>ããã«ã¿ã¤ãã«ãæ¿å ¥</title> <table width="27%" height="194" border="0" cellpadding="1" cellspacing="0"> <tr> <td width="21%"><select id="selectfrom" size="15" multiple style="width:100px"> <option>a</option> <option>b</option> <option>c</option> <option>d</option> <option>e</option> <option>f</option> <option>g</option> <option>h</option> <option>i</option> <option>j</option> <option>k</option> <option>j</option> <option>m</option> <option>n</option> </select></td> <td width="57%"> <p align="center"> <input name="addAll" type="button" id="addAll" value=" >> " style="width:40px" onclick="addAll()"> </p> <p align="center"> <input name="add" type="button" id="add" style="width:40px" value=" > " onclick="add()"> </p> <p align="center"> <input name="del" type="button" id="del" value=" < " style="width:40px" onclick="del()"> </p> <p align="center"> <input name="delAll" type="button" id="delAll" value=" << " style="width:40px" onclick="delAll()"> </p> </td> <td width="22%"><select id="select2" size="15" multiple style="width:100px"> </select></td> </tr> </table> </textarea> <br><input onclick="runEx('runcode96609')" type="button" value="è¿è¡ä»£ç "><input onclick="doCopy('runcode96609')" type="button" value="å¤å¶ä»£ç "> <input onclick="doSave(runcode96609)" type="button" value="ä¿å代ç "> <a href="http://www.jb51.net/article/23421.htm" title="æ¥çå ·ä½è¯¦æ " target="_blank">[Ctrl A ãã¹ã¦é¸æ 注: </a>å¤é¨ Js ãå°å ¥ããå¿ è¦ãããå ´åã¯ã</div> ãå®è¡ããããã«æ´æ°ããå¿ è¦ãããã¾ã]<script language="javascript"> function add(){ var opt=selectfrom.options; len=opt.length; for(i=len-1;i>-1;i--){ if(opt[i].selected){ select2.appendChild(opt[i]); } } } function addAll(){ var opt=selectfrom.options; len=opt.length; for(i=len-1;i>-1;i--){ select2.appendChild(opt[i]); } } function del(){ var opt=select2.options; len=opt.length; for(i=len-1;i>-1;i--){ if(opt[i].selected){ selectfrom.appendChild(opt[i]); } } } function delAll(){ var opt=select2.options; len=opt.length; for(i=len-1;i>-1;i--){ selectfrom.appendChild(opt[i]); } } </script>