//*****弹出窗口代码 function WindowsOptn(varurl,varwidth,varheight) { var vartop=(screen.width-varwidth)/2; var varleft=(screen.height-varheight)/2); window.open(varurl,"onices","width=400,height=200,left="+varleft+",top="+vartop+""); }//****拆行相应功能,调用js函数就可以了三 Page.RegisterStartupScript("openwindows", "<script>WindowsOptn('selectuser.aspx','600','400');</script>");
window.open ('page.html', 'newwindow', 'height=100, width=400, top=0, left=0, toolbar=no, menubar=no, scrollbars=no, resizable=no,location=n o, status=no')
{
string windowAttribs;
windowAttribs = "dialogHeight: "+Height.ToString()+"px; dialogWidth: "+Width.ToString()+"px;edge: Raised; center: Yes; help: No; resizable: No; status: No; scroll:No;";
string strscript="<script language='javascript'>\n";
strscript += "window.showModalDialog('"+YesURL+"','','"+windowAttribs+"');\n";
strscript += "</script>";
if(!mypage.IsStartupScriptRegistered("ConfirmMsg"))
mypage.RegisterStartupScript("ConfirmMsg", strscript);
}
{
string clientScript;
string windowAttribs;
windowAttribs = "left=" + Left.ToString() + "px," +
"top=" + Top.ToString() + "px," +
"width=" + width.ToString() + "px," +
"height=" + height.ToString() + "px," +
"left='+((screen.width -" + width.ToString()+ ") / 2)+',";
clientScript = "window.open('"+PagePath+ "','"+
windowName + "','"+ windowAttribs + "');return false;";
opener.Attributes.Add("onClick", clientScript);
}
,。
popUpWindow(this,b.aspx,200,200)
function WindowsOptn(varurl,varwidth,varheight)
{
var vartop=(screen.width-varwidth)/2;
var varleft=(screen.height-varheight)/2); window.open(varurl,"onices","width=400,height=200,left="+varleft+",top="+vartop+"");
}//****拆行相应功能,调用js函数就可以了三
Page.RegisterStartupScript("openwindows", "<script>WindowsOptn('selectuser.aspx','600','400');</script>");