zoukankan      html  css  js  c++  java
  • Asp.net 高亮显示鼠标所在行

    调用的JavaScript:

        <script type="text/javascript">
        
    /*高亮显示鼠标所在行*/
        
    function mouseovertd2(o)
        {
        dff
    =o.style.backgroundColor;
        o.style.backgroundColor
    ="#EAEBF1";
        }
        
    function mouseouttd2(o)
        {
         o.style.backgroundColor
    =dff;
        }
        
    </script>

     GridView中的DataBound事件代码:

    protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
        {        
            
    if (e.Row.RowType == DataControlRowType.DataRow)
            {
                e.Row.Attributes.Add(
    "onmouseover""mouseovertd2(this)");
                e.Row.Attributes.Add(
    "onmouseout""mouseouttd2(this)");
                e.Row.Attributes[
    "style"= "Cursor:hand";
            }
        }
  • 相关阅读:
    02-cocoapods的安装和使用
    01-唐巧之cocoapods
    class0513(html)
    程序集
    c#面向对象
    html
    dom
    Javascript
    Jquery
    ado.net
  • 原文地址:https://www.cnblogs.com/scottckt/p/1299703.html
Copyright © 2011-2022 走看看