鼠标悬停显示注解
<td><img title="" class="light" src="${res}/img/yellow.png"></img></td> <script> $(".light").mouseenter(function(){ var at = $(this).attr("src"); if(at.indexOf("yellow") > -1) { $(this).attr("title","警告!"); }else if (at.indexOf("green") > -1) { $(this).attr("title","正常!"); }else if (at.indexOf("red") > -1) { $(this).attr("title","逾期!"); } }); </script>