How to highlight a line in jsp web search results-javascript tutorial

Source: Internet
Author: User
To make the search results better, You need to highlight the selected rows. Here is a good example. If you want to see the results, to make the selected rows better visible, I used an onclick event:

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 html code dynamically generated on the webpage:

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 () + "");

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.