为什么我还没有点击它就自己移动了
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>jQuery动画特效</title>
<script src="http://libs.baidu.com/jquery/1.9.0/jquery.js" type="text/javascript"></script>
<style type="text/css">
.haha{width:80px;height:80px;border:1px solid red;background-color:blue;position:relative;}
</style>
</head>
<body>
<div class="haha"></div>
<input type="button" class="one" value="左移" />
<input type="button" class="two" value="右移" />
<label></label>
<script type="text/javascript">
function left(){
$(".haha").animate({left:"+=50px"},3000,function(){
$("label").html("左移完成");
})
}
function right(){
$(".haha").animate({left:"-=50px"},3000,function(){
$("label").html("右移完成");
})
}
$(".one").bind("click",left());
$(".two").bind("click",right());
</script>
</body>
</html>