日期:2014-05-17 浏览次数:20468 次
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
string username = ((System.Data.DataRowView)(e.Row.DataItem)).Row["Fusername"] as string;
string userpassword = ((System.Data.DataRowView)(e.Row.DataItem)).Row["Fuserpassword"] as string;
string userflag = ((System.Data.DataRowView)(e.Row.DataItem)).Row["fuserflag"] as string;
e.Row.Attributes.Add("onmouseover", "c=this.style.backgroundColor;this.style.backgroundColor='#8EC26F'");
//当鼠标移开时还原背景色
e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor=c");
//设置悬浮鼠标指针形状为"小手"
e.Row.Attributes["style"] = "Cursor:hand";
e.Row.Attributes.Add("onClick", "getuserInfo('" + username + "','" + userpassword + "','" + userflag + "')");
//e.Row.Attributes.Add("onClick", "test()");
}
}
function getInfo(Fusername, Fuserpassword, Fuserflag) {
alert(Fusername);
window.opener.getuserInfo(Fusername, Fuserpassword, Fuserflag);
window.close();
}