第三個(gè)例子很喜歡哈!但開始就有那條線不喜歡,變?yōu)?時(shí)最好隱藏一下!
????$("#t").hide(); ????$("input[type=checkbox]").on("click",function(){ ??????var?checkedCount?=?$("input:checked").length; ??????console.log(checkedCount); ??????if(checkedCount>0){ ????????$("#t").show().text(checkedCount==1??"1?is?checked!"?:?checkedCount?+?"are?"?+"checked!"); ??????}else{ ????????$("#t").hide(); ??????} ????});
2015-05-12
你看這樣行嗎~