Home  >  Article  >  Web Front-end  >  Use jquery to change the background color of the click column_jquery

Use jquery to change the background color of the click column_jquery

WBOY
WBOYOriginal
2016-05-16 17:46:531390browse

How to use jquery to click on one column to change color, and then click on another column to change color, but the original one changes back to its original color. I have an array a (1, 2, 3, and I loop through it to output the value of a.

Copy code The code is as follows:

Click 1,1 to change color, click 2,2 to change color, but 1 will change back to its original color. My show method implements other functions.
The following is my initial test code:
HTML code:
Copy code The code is as follows :


JScript code: