這樣為啥沒效果?
$("#test3").on({ ????????mousedown:?function(){ ????????????$(this).css("background","red"); ????????} ????????mouseup:?function(){ ????????????$(this).css("background","green");?????? ????????????} ???????? ????})
?
$("#test3").on({ ????????mousedown:?function(){ ????????????$(this).css("background","red"); ????????} ????????mouseup:?function(){ ????????????$(this).css("background","green");?????? ????????????} ???????? ????})
?
2016-12-11
舉報
2016-12-11
兩個對象之間缺了一個逗號
$("#test3").on({
?
????????mousedown:?function(){
?
????????????$(this).css("background","red");
?
????????},
?
????????mouseup:?function(){
?
????????????$(this).css("background","green");??????
?
????????????}
?
?????????
?
????})
2016-12-11
特意新建了個demo測試了下。。
2016-12-11
說錯了是對象的兩個屬性之間缺了逗號 ?忘采納