您现在的位置是:首页 >

a标签实现点击事件 为GridView的行添加鼠标经过、点击的事件。

火烧 2023-02-28 09:47:13 1076
为GridView的行添加鼠标经过、点击的事件。 rotected void GridView _RowDataBou d o ject e der GridViewRowEve tArg e { e

为GridView的行添加鼠标经过、点击的事件。  

a标签实现点击事件 为GridView的行添加鼠标经过、点击的事件。
   protected void GridView _RowDataBound(object sender GridViewRowEventArgs e)    {        e Row Attributes Add( onmouseover c=this style backgroundColor;this style backgroundColor= # B FF );        e Row Attributes Add( onmouseout this style backgroundColor=c );        e Row Attributes[ style ] = Cursor:hand ;        int count = GridView Rows Count;        string ID = ;        for (int i = ; i < count; i++)        {            ID = GridView DataKeys[i] Value ToString();            GridView Rows[i] Attributes Add( onclick newwin=window open( default aspx?ID= + ID + newwin width= height= ) );        }    } lishixinzhi/Article/program/net/201311/13830  
永远跟党走
  • 如果你觉得本站很棒,可以通过扫码支付打赏哦!

    • 微信收款码
    • 支付宝收款码