这段代码是写还是错?
imgbtnProdSearch.Attributes.Add("onclick", "window.open('popUp.aspx?name=" +txtSelectProdName.ClientID+"','_new','width=1000px,height=1000px');return false");
答案 0 :(得分:0)
您是否尝试按如下方式在页面加载中添加代码。
protected void Page_Load(object sender, EventArgs e)
{
imgbtnProdSearch.Attributes.Add("onclick", "window.open('popUp.aspx','_new','width=1000px,height=1000px');return false");
}
编辑...
protected void Page_Load(object sender, EventArgs e)
{
imgbtnProdSearch.Attributes.Add("onclick", "window.open('popUp.aspx','_new','width=1000px,height=1000px');return true");
}