protected
void
Page_Load(
object
sender, EventArgs e)
{
ShowWindow( " 我的天啊真漂亮 " , 600 , 400 , " Pop.aspx " );
}
public static void ShowWindow( string title, int width, int height, string url)
{
StringBuilder str = new StringBuilder();
str.Append( " <div id='formDiv' style='display:;Z-INDEX:100;FILTER:alpha(Opacity=40);LEFT:0px;WIDTH:100%;POSITION:absolute;TOP:0px;HEIGHT:100%;BACKGROUND-COLOR:lightgrey'> " );
str.Append( " <table width='100%' height='100%' cellpadding='0' cellspacing='0' border='0'> " );
str.Append( " <tr > " );
str.Append( " <td></td> " );
str.Append( " </tr> " );
str.Append( " </table> " );
str.Append( " </div> " );
str.Append( " <div id='arltDiv' align='center' style='display:;Z-INDEX: 101;WIDTH: " + width.ToString() + " px; POSITION: absolute; HEIGHT: " + height.ToString() + " px'> " );
str.Append( " <table width='100%' height='100%' cellpadding='0' cellspacing='0' align='center' > " );
str.Append( " <tr style='background-image:url(Images/Xp_background.gif); height:30px'> " );
str.Append( " <td align='left' valign='middle' style=' font-size:13px; font-weight:bold; color:White; font-family: 宋体'> <b> " + title + " </b></td> " );
str.Append( " <td align='right' valign='middle'><img alt='关闭' src='Images/b_close_2.gif' οnmοuseοver='imageUp1(this);' οnmοuseοut='imageUp2(this);' οnclick='hideDiv()'/> </td> " );
str.Append( " </tr> " );
str.Append( " <tr> " );
str.Append( " <td colspan='2' bgcolor='#ffffff' align='center' width='100%' style='border-right: #9999ff 3px ridge; border-top: #9999ff 0px ridge; border-left: #9999ff 3px ridge; border-bottom: #9999ff 3px ridge;'> " );
str.Append( " <iframe width='98%' height='98%' scrolling='no' src=' " + url + " ' frameborder='0' style='border:0px'></iframe> " );
str.Append( " </tr> " );
str.Append( " </table> " );
str.Append( " </div> " );
str.Append( " <script type='text/javascript'> " );
str.Append( " var width_c= " + width.ToString() + " ; " );
str.Append( " var height_c= " + height.ToString() + " ; " );
str.Append( " var sw = screen.width; " );
str.Append( " var sh = screen.height; " );
str.Append( " var left = (sw - width_c)/2; " );
str.Append( " var top = (sh - height_c)/2-50; " );
str.Append( " document.getElementById('arltDiv').style.top=top; " );
str.Append( " document.getElementById('arltDiv').style.left=left; " );
str.Append( " function hideDiv(){ " );
str.Append( " document.getElementById('formDiv').style.display='none'; " );
str.Append( " document.getElementById('arltDiv').style.display='none'; " );
str.Append( " } " );
str.Append( " function imageUp1(img){ " );
str.Append( " img.src='Images/b_close_1.gif'; " );
str.Append( " } " );
str.Append( " function imageUp2(img){ " );
str.Append( " img.src='Images/b_close_2.gif'; " );
str.Append( " } " );
str.Append( " </script> " );
HttpContext.Current.Response.Write(str);
}
{
ShowWindow( " 我的天啊真漂亮 " , 600 , 400 , " Pop.aspx " );
}
public static void ShowWindow( string title, int width, int height, string url)
{
StringBuilder str = new StringBuilder();
str.Append( " <div id='formDiv' style='display:;Z-INDEX:100;FILTER:alpha(Opacity=40);LEFT:0px;WIDTH:100%;POSITION:absolute;TOP:0px;HEIGHT:100%;BACKGROUND-COLOR:lightgrey'> " );
str.Append( " <table width='100%' height='100%' cellpadding='0' cellspacing='0' border='0'> " );
str.Append( " <tr > " );
str.Append( " <td></td> " );
str.Append( " </tr> " );
str.Append( " </table> " );
str.Append( " </div> " );
str.Append( " <div id='arltDiv' align='center' style='display:;Z-INDEX: 101;WIDTH: " + width.ToString() + " px; POSITION: absolute; HEIGHT: " + height.ToString() + " px'> " );
str.Append( " <table width='100%' height='100%' cellpadding='0' cellspacing='0' align='center' > " );
str.Append( " <tr style='background-image:url(Images/Xp_background.gif); height:30px'> " );
str.Append( " <td align='left' valign='middle' style=' font-size:13px; font-weight:bold; color:White; font-family: 宋体'> <b> " + title + " </b></td> " );
str.Append( " <td align='right' valign='middle'><img alt='关闭' src='Images/b_close_2.gif' οnmοuseοver='imageUp1(this);' οnmοuseοut='imageUp2(this);' οnclick='hideDiv()'/> </td> " );
str.Append( " </tr> " );
str.Append( " <tr> " );
str.Append( " <td colspan='2' bgcolor='#ffffff' align='center' width='100%' style='border-right: #9999ff 3px ridge; border-top: #9999ff 0px ridge; border-left: #9999ff 3px ridge; border-bottom: #9999ff 3px ridge;'> " );
str.Append( " <iframe width='98%' height='98%' scrolling='no' src=' " + url + " ' frameborder='0' style='border:0px'></iframe> " );
str.Append( " </tr> " );
str.Append( " </table> " );
str.Append( " </div> " );
str.Append( " <script type='text/javascript'> " );
str.Append( " var width_c= " + width.ToString() + " ; " );
str.Append( " var height_c= " + height.ToString() + " ; " );
str.Append( " var sw = screen.width; " );
str.Append( " var sh = screen.height; " );
str.Append( " var left = (sw - width_c)/2; " );
str.Append( " var top = (sh - height_c)/2-50; " );
str.Append( " document.getElementById('arltDiv').style.top=top; " );
str.Append( " document.getElementById('arltDiv').style.left=left; " );
str.Append( " function hideDiv(){ " );
str.Append( " document.getElementById('formDiv').style.display='none'; " );
str.Append( " document.getElementById('arltDiv').style.display='none'; " );
str.Append( " } " );
str.Append( " function imageUp1(img){ " );
str.Append( " img.src='Images/b_close_1.gif'; " );
str.Append( " } " );
str.Append( " function imageUp2(img){ " );
str.Append( " img.src='Images/b_close_2.gif'; " );
str.Append( " } " );
str.Append( " </script> " );
HttpContext.Current.Response.Write(str);
}