Home > Web Front-end > JS Tutorial > body text

Select a line to highlight it in jsp web search results_javascript skills

WBOY
Release: 2016-05-16 16:59:53
Original
1570 people have browsed it

When I was making search results, I needed to highlight the selected row to make it look better. I used an onclick event:

Copy code The code is as follows:

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:
Copy the code The code is as follows:

out.println("");

out.println("" Info.getAssetsNo() "");
out.println("" Info.getSerialNo() "");
out.println("" Info.getAssetsName() " ");
out.println("" Info.getAssetsClass() "");
out.println("" Info.getCgTime() "");
out.println("" Info.getGbTime() " ");
out.println("" Info.getConfigInfo() "");
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template