<form>
<select name="rolesName" size="4" MULTIPLE width=200 style="width:200px">
<option>1
<option>2
<option>3
<option>4</select>
<input type="button" onclick="Moveup(this.form.rolesName)
" value="上移">
<input type="button" onclick="Movedown(this.form.rolesName)" value="下移"><br><script>
function Moveup(dbox) {
i=dbox.options.selectedIndex;
dbox.options[i].swapNode(dbox.options[(i!=0)?(i-1):0]);
}function Movedown(dbox) {
i=dbox.options.selectedIndex;
dbox.options[i].swapNode(dbox.options[(i<dbox.length-1)?(i+1):i]);}
</script>
<form>