How to move the javascript table into and move the mouse in and out, and how to move the javascript table out

Source: Internet
Author: User

How to move the javascript table into and move the mouse in and out, and how to move the javascript table out

This article describes how to change the color of a javascript table by moving the mouse in and out, and how to click it. Share it with you for your reference. The specific analysis is as follows:

Table line-by-line discoloration is also a js effect to improve user experience.

Effect implementation:

The color of the table's parity rows is different. This prevents users from reading data in serial mode.
The color changes when the mouse moves into a row. This allows users to clearly know which row they are reading.

Click to change the color of the table. This allows you to select the items you want to retain.
 
Note:

I % 2: The modulo value of each number and 2 is only 0 and 1, so that the color of the line can be changed.
Tables_li [I]. onoff = 1; To achieve click color change, the color is not overwritten when the mouse moves in and out.
 
Code:

<! DOCTYPE html PUBLIC "-// W3C // dtd xhtml 1.0 Transitional // EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 

I hope this article will help you design javascript programs.

Related Article

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.