鼠标单击button1后将button1移动到button2的后面
<div>
<input type="button" id="button1" value="1" onclick="moveBtn(this);">
<input type="button" id="button2" value="2" /> 
</div>
<script type="text/javascript">
function moveBtn(obj){
var clone=obj.cloneNode(true);
var parent=obj.parentNode;
parent.appendChild(clone);
parent.removeChild(obj);
}
</script>

声明:此文系舞林cuznwww.wulinlw.org)原创稿件,转载请保留版权

et_highlighter