為啥我把代碼改成這樣就執行不了,對比了半天,實在看不出問題
<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')
? ? ? ? ? ? )};
? ? ? ? ? ? ? ??
? ? ? ? ? ??
? ? ? ? });
? ? ? ??
2017-09-16
<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>
2017-06-08
這個括號寫錯了~~應該是 })
2017-05-18