When I was doing the search results, in order to look good, the selected lines were highlighted, and I used an onClick event:
Copy code code as follows:
var assno = "";
Function Check (Obj, Che, RWID) {
if (obj.checked == true) {
document.GetelementByid (RWID) .style.Background = "Blue";
asso = document.GetelementByid (che). Value;
alert (asso);
}
}
This is the dynamically generated html code in the web page:
Copy code code as follows:
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>");