<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title></title> <style type="text/css"> div{ width:50px; height:50px; background-color:red; position:absolute; left:10px; } </style> <script src="js/jquery.js"></script> <script> $(function(){ $('#btnok').bind('click',function(){ $('div').animate({ left:+800 //+号向右走,-号向左走 },3000); }); }); </script> </head> <body> <input type="button" id="btnok" value="移动" /> <hr /> <div></div> </body> </html>