javascript实现表格鼠标移到行上切换背景色

<script type="text/javascript">
    var rows = document.getElementByTagName("tr");
    for(var i = 0; i < rows.length; i++){
        rows[i].onmouseover = functioon(){
            this.className += 'altrow';
        }
        rows[i].onmouseout = functioon(){
            this.className = this.className.replace( 'altrow','');
        }
    }
</script>
原文地址:https://www.cnblogs.com/libingql/p/2964119.html