通过JS实现鼠标经过表中行时改行颜色高亮。选中表中行时触发事件(页面跳转)。
function showtip() {
var tbl = document.getElementById("Tab");
for (var i = 0; i < tbl.rows.length; i++) {
tbl.rows[i].onmouseover = function () {
if (window.cur) window.cur.style.background = "#000000";
this.style.background = "#FFFFFF";
window.cur = this;
}
tbl.rows[i].onclick = function () {
window.location.href = “http:
}
}
}
html
<table id="Tab">
...
</table>