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
Copy the code code as follows:
<script type="text/javascript">
var currentActiveRow; //Current active row
//Change the color of the selected row
function changeActiveRow(obj) {
if (currentActiveRow) {
currentActiveRow.style.backgroundColor = "";
}
currentActiveRow = obj;
currentActiveRow.style.backgroundColor = "#F2F2F2";
}
</script>
Then set the onmousehover or onclick event on td to onmouseover="changeActiveRow(this)"