JSP page search results in the implementation of a selected line of its highlighting


When I did the search results, I used an onclick event to highlight the selected lines for good looks:


var assno="";
function check(obj,che,rwid){
if(obj.checked==true){
document.getElementById(rwid).style.background ="blue";
assno=document.getElementById(che).value;
alert(assno);
}
}

This is the dynamically generated HTML code in the web page:


out.println("<tr id="+idrow+"><td align=/"center/"><input type=/"checkbox/" onclick=/"check(this,'"+par+"','"+idrow+"');/"/></td>");

out.println("<td id=/""+par+"/"align=/"center/" value=/""+Info.getAssetsNo()+"/">"+Info.getAssetsNo()+"</td>");
out.println("<td align=/"center/">"+Info.getSerialNo()+"</td>");
out.println("<td align=/"center/">"+Info.getAssetsName()+"</td>");
out.println("<td align=/"center/">"+Info.getAssetsClass()+"</td>");
out.println("<td align=/"center/">"+Info.getCgTime()+"</td>");
out.println("<td align=/"center/">"+Info.getGbTime()+"</td>");
out.println("<td align=/"center/">"+Info.getConfigInfo()+"</td>");