<input type="button" value="左移"/> <input type="button" value="右移"/> <div style="width:20px;height:20px;background-color:green;position:absolute;left:100px;top:100px"></div>
<script type="text/javascript"> $("input[value='左移']").bind("click",function(){ $("div").animate({ left: "-=50px" },1000) }) $("input[value='右移']").bind("click",function(){ $("div").animate({ left: "+=50px" },1000) }) </script>