为了账号安全,请及时绑定邮箱和手机立即绑定

点击按钮没有反应?

点击按钮没有反应?

芦苇薇薇恋 2016-04-21 16:40:44
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml">    <head>        <title>执行动画效果</title>        <script src="http://libs.baidu.com/jquery/1.9.0/jquery.js" type="text/javascript"></script>      <style type ="text/css">div{    left:150px;    position:absolute;    width:80px;    height:80px;    border: solid 1px #ccc;    margin: 0px 8px;    background-color: Red;    color:White;    vertical-align:middle}      </style>    </head>        <body>        <h3>执行动画效果</h3>        <span>        <input id="left" type="button" value="左移" />        <input id="right" type="button" value="右移" />        </span>        <div id="tip"></div>        <script type="text/javascript">            $(function() {                 $("#left").bind("click", function(){                    $("div").animate({                    left:"-=50px"                }, 1000, function () {                        $("#tip").html("左移执行完成!");                    });                 });                                    $("#right").bind("click", function() {                    $("div").animate({                    left:"+=50px"                }, 1000, function () {                        $("#tip").html("右移执行完成!");                    });                });            }              </script>      </body></html>
查看完整描述

1 回答

已采纳
?
qq_青枣工作室_0

TA贡献446条经验 获得超754个赞

打开控制台,就能看到错误啦。你48行少了一个括号)。

要在倒数第4行,后面加上一个括号 )

查看完整回答
2 反对 回复 2016-04-21
  • 1 回答
  • 1 关注
  • 1238 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信