Home >Web Front-end >JS Tutorial >javascript uses onclick event to change the color of the selected row_javascript skills
The table in the html page can be displayed line by line. Of course, divs can also be set to change their color when the mouse is placed on it. Part of the code is as follows
Then set the onmousehover or onclick event on td onmouseover="changeActiveRow(this)"