<style>
li{
list-style:none;
}
</style>
<script>
function D(){
var radio = document.all.sel;
var ele = null;
for(var i=0;i<radio.length;i++){
if(radio[i].checked)
ele = radio[i];
}
ele.nextSibling.parentNode.swapNode(ele.nextSibling.parentNode.nextSibling)
ele.checked=true;
}
function A(){
var radio = document.all.sel;
var ele = null;
for(var i=0;i<radio.length;i++){
if(radio[i].checked)
ele = radio[i];
}
ele.nextSibling.parentNode.swapNode(ele.nextSibling.parentNode.previousSibling)
ele.checked=true;
}
</script>
<input type="button" value="X" onClick="D()" ><input type="button" value="S" onClick="A()" >
<div>
<li><input type="radio" name="sel" value=""><input type="text" value="1" ></li>
<li><input type="radio" name="sel" value=""><input type="text" value="2" ></li>
<li><input type="radio" name="sel" value=""><input type="text" value="3" ></li>
<li><input type="radio" checked name="sel" value=""><input type="text" value="4" ></li>
<li><input type="radio" name="sel" value=""><input type="text" value="5" ></li>
<li><input type="radio" name="sel" value=""><input type="text" value="6" ></li>
<li><input type="radio" name="sel" value=""><input type="text" value="7" ></li>
<li><input type="radio" name="sel" value=""><input type="text" value="8" ></li>
</div>