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

为啥我把代码改成这样就执行不了,对比了半天,实在看不出问题

<h4>测试一</h4>

        <div id="right">hide动画操作</div>

        <button id="btn">hide带动画</button>

        <script type="text/javascript">

        //点击buttom2 执行动画隐藏

        $("#btn").click(function() {

            $("#right").hide(3000,function(){

                //$('h4').css({'color':'red'});

                alert('sjfjshg')

            )};

                

            

        });

        


正在回答

3 回答

<div class="left">

      <h4>测试一</h4>

        <div id="right">hide动画操作</div>

        <button id="btn">hide带动画</button>

        <script type="text/javascript">

        //点击buttom2 执行动画隐藏

        $("#btn").click(function(){

            $("#right").hide(3000,function(){

                alert('sjfjshg')

            })   //注意两个括号的顺序

        }) 

  </script>   //注意标签的闭合

 </div>


1 回复 有任何疑惑可以回复我~

http://img1.sycdn.imooc.com//5938b4e70001666503410273.jpg

这个括号写错了~~应该是 })

1 回复 有任何疑惑可以回复我~
<h4>测试一</h4>
        <div id="right">hide动画操作</div>
        <button id="btn">hide带动画</button>
        <script type="text/javascript">
        //点击buttom2 执行动画隐藏
        $("#btn").click(function() {
        	$("#right").hide(3000,function(){
        		 alert('sjfjshg')
        	})
        })


1 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

为啥我把代码改成这样就执行不了,对比了半天,实在看不出问题

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信