GridView中可以这样写
protected void grvList_RowDataBound(object sender, GridViewRowEventArgs e)
  {
  if (e.Row.RowType == DataControlRowType.DataRow)
  {
  e.Row.Attributes.Add("onmouseover", "c=style.backgroundColor;style.backgroundColor='#add8e6'");
  e.Row.Attributes.Add("onmouseout", "style.backgroundColor=c");

  //double click
  string strId = grvList.DataKeys[e.Row.RowIndex].Value.ToString();
  e.Row.Attributes.Add("ondblclick", "location.href='test.aspx?Id=" + strId + "'");
  e.Row.Attributes["style"] = "Cursor:hand";
  }
  }

相关文章:

  • 2021-10-09
  • 2021-11-24
  • 2021-04-14
  • 2021-12-28
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-01-07
  • 2022-12-23
  • 2022-12-23
  • 2021-12-03
  • 2022-12-23
相关资源
相似解决方案