Highlight Row on Rollover





10
Date Submitted Wed. Feb. 28th, 2007 3:35 PM
Revision 1 of 1
Helper mjlintz
Tags JavaScript
Comments 2 comments
Highlight table row on rollover.

<script type="text/javascript">

        function hiLiteRows(){
                var x = document.getElementsByTagName('tr');
                for (var i=0;i<x.length;i++)
                {
                        x[i].onmouseover = function () {this.origColor=this.style.backgroundColor;
                                        this.style.backgroundColor='#D8E5F2';
                        }
                        x[i].onmouseout = function () {this.style.backgroundColor=this.origColor;}
                }
        }
       
        window.onload=hiLiteRows;

</script>
 

Michael Lintz

Comments

Comments Beautiful
Sat. May. 12th, 2007 7:44 AM    Helper albud
Comments Nice, but...
Wed. Nov. 28th, 2007 7:57 AM    Helper HRCerqueira

Voting