问题js所有函数都有回调函数吗?,形如在函数后面加上如下,function(){ //}下面2,3没有执行alert("aa"),1,4执行了alert("aa")<!DOCTYPE html><html><head> <meta charset="UTF-8"> <title></title></head><body><button id="btn">btn</button><script src="https://cdn.bootcss.com/jquery/1.11.0/jquery.min.js"></script><script> $("#btn").click(function(){// $(this).css("color","red");// 1.有弹出// $(this).css("color",function(){// alert("aa");// });// 2.没有弹出// $(this).css("color","red",function(){// alert("aa");// }) // 3.没有弹出 $(this).css({"color":"red"},function(){ alert("aa"); })// 4.有弹出// $(this).hide("hide",function(){// alert("aa");// }) })</script></body></html>
添加回答
举报
0/150
提交
取消
