javascript - how to i change mouse pointer to hand signal and change the color of row while mouse go over a row in table -
<logic:iterate name="studentdetails" id="student" indexid="index"> <tr> <td><bean:write name="student" property="name" /></td> <td><bean:write name="student" property="age" /></td> <td><bean:write name="student" property="class" /></td> <td><bean:write name="student" property="mark" /></td> <td><bean:write name="student" property="result" /></td> </tr> </logic:iterate>
i want display student details, , want highlight passed student details in diffrent color/set mouse pointer hand signal while mouse go on rows in result table.
how can checked student details passed or not , how set highlighting color in table iterator?
add onmouseover or onmouseout in
<tr onmouseover="changecolor(this,${student.result})>
add script also
<script type="text/javascript"> function changebackgroundcolor(row, result) { if(result =="pass") { row.style.backgroundcolor = 00ff33; $(row).css("cursor","pointer"); } else row.style.backgroundcolor = #ff0000 ; } </script>
Comments
Post a Comment