html頁面的table 中一行一行的顯示當然 div也行 可設置在鼠標放上去時改變其顏色 部分代碼如下
<script type="text/javascript">
var currentActiveRow; //當前活動行
//改變選中行的顏色
function changeActiveRow(obj) {
if (currentActiveRow) {
currentActiveRow.style.backgroundColor = "";
}
currentActiveRow = obj;
currentActiveRow.style.backgroundColor = "#F2F2F2";
}
</script>
然後在td上設置onmousehover或者onclick事件即可 οnmοuseοver="changeActiveRow(this)"