您现在的位置是:首页
>
a标签实现点击事件 为GridView的行添加鼠标经过、点击的事件。
为GridView的行添加鼠标经过、点击的事件。 rotected void GridView _RowDataBou d o ject e der GridViewRowEve tArg e { e
为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
很赞哦! (1076)