请问用window.location.href='xxxx.aspx'怎么打开新窗口?
我在DataGrid里面想点击行弹出内容怎么做
public void dg_ItemCreated(object sender, System.Web.UI.WebControls.DataGridItemEventArgs e)
{
if(e.Item.ItemIndex!=-1)
{
//链接
e.Item.Attributes.Add("onclick","window.location.href='msinfo.aspx?leib="+Request["leib"].ToString()+"&id="+DataGrid1.DataKeys[(int)e.Item.ItemIndex]+"'");
//原色和变色
e.Item.Attributes.Add("onmouseover","this.setAttribute('BKC',this.style.backgroundColor);this.style.cursor='hand',this.style.backgroundColor='#dddddd'");
e.Item.Attributes.Add("onmouseout","this.style.backgroundColor=this.getAttribute('BKC');");
}
}
以上代码全都可以实现链接,但不是打天新窗口
小弟想让它打开新窗口要加什么属性?