首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > Web前端 >

onmouseover跟onmouseout应用于RadioButtonList或CheckBoxList

2013-03-21 
onmouseover和onmouseout应用于RadioButtonList或CheckBoxListscript typetext/javascriptfunction w

onmouseover和onmouseout应用于RadioButtonList或CheckBoxList

<script type="text/javascript">        function windowOnLoad() {            var rbl = document.getElementById('<%= RadioButtonListFivePhases.ClientID %>');            var labels = rbl.getElementsByTagName('label');            for (var i = 0; i < labels.length; i++) {                var lbl = labels[i];                lbl.onmouseover = function () {                    this.className = 'overStyle';                };                lbl.onmouseout = function () {                    this.className = 'outStyle';                };            }        }        window.onload = windowOnLoad;    </script>
<style type="text/css">        .overStyle {            font-weight: bold;            color: #f00;        }        .outStyle {            font-weight: normal;            color: none;        }    </style>

热点排行