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.