<style type="text/css">
tr
{
css : expression(onmouseover=function() {bgColor=this.style.backgroundColor;this.style.backgroundColor="violet";this.style.cursor="hand";},
onmouseout=function() {this.style.backgroundColor=bgColor;})
}
</style>
protected void gridViewXML_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.Attributes.Add("onmouseover", "bgColor=this.style.backgroundColor;this.style.backgroundColor='violet';this.style.cursor='hand';");
e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor=bgColor");
string value = string.Format("return confirm('确实要删除编号“{0}”吗?');", e.Row.Cells[1].Text);
e.Row.Cells[delIndex].Attributes.Add("OnClick", value);
}
}