不知道哪错了
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>jQuery动画特效</title>
</head>
<body>
<input id="left" type="button" value="左移"/>
<input id="right" type="button" value="右移"/>
<div style="width:50px; height:50px; background-color:#ff0000; position:relative; left:60px;top:50px"></div>
<span></span>
<script type="text/javascript">
$(function(){
$("#left").bind("click",function(){
$("div").animate({
left:"-=50px"
},2000,function(){
$("span").html("向左移动了!")
});
});
$("#right").bind("click",function(){
$("div").animate({
left:"+=50px"
},2000,function(){
$("span").html("向右移动了!")
});
});
});
</script>
</body>
</html>