为什么不显示呢?最后只有个ok消息,我的样式没设置么?
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!--导入Jquery库-->
<script src="http://libs.baidu.com/jquery/1.9.0/jquery.js" type="text/javascript"></script>
<link href="style.css" rel="stylesheet" type="text/css" />
<title>jQuery动画特效</title>
<script type="text/css">
span{
position:absolute;
width:80px;
height:80px;
border: solid 1px #ccc;
margin: 0px 8px;
background-color: Red;
color:White;
vertical-align:middle
}
</script>
</head>
<body>
<input type="button" id="btn1" value="左移" >
<input type="button" id="btn2" value="右移"><br/>
<span>hello</span>
</body>
<script type"text/javascript">
$(function(){
$("#btn1").bind("click",
function (){
$("span").animate({
left:"+=50px"
},3000,function(){
alert("ok");
});
});
});
</script>
</html>