$('#timetable td').each(function(){ $(this).click(function(){ if($(this).html()=="√"){ $(this).css("background-color","white"); $(this).text(""); }else { $(this).css("background-color", "#96b8ff");//设置点击td的颜色 $(this).text("√"); } }); });
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
再分享一下我老师大神的人工智能教程吧。零基础!通俗易懂!风趣幽默!还带黄段子!希望你也加入到我们人工智能的队伍中来!https://blog.csdn.net/jiangjunshow