弹出窗口, 不显示工具栏等。

<script>
  opener
=null//在没有提示的状态下,关闭当前窗口
  window.close();
  
var he=screen.availheight-75;
  
var wi=screen.availwidth-8;
  window.open (
"URL""newwindow""height="+he+",width="+wi+",=yes, toolbar=yes,scrollbars=yes,menubar=no, resizable=yes, location=no, status=yes,left=0,top=0")
</script>

<script language="javascript">
function SetOpenWindowChild(WinName){  
var strWindowType="";
var newwin=null;
//directories=[yes|no|1|0] 指定是否出现链接工具栏.
 strWindowType=strWindowType+"directories=no" + ",";
//channelmode=[yes|no|1|0] (IE4.0 only)为1时以'全屏模式'(相当于按F11)打开,并出现频道栏. 
strWindowType=strWindowType+"channelmode=no" + ",";
//fullscreen=[yes|no|1|0] (IE4.0 only) 指定全屏模式打开,如果忘了放置关闭按钮,只好用ALT+F4了. 
strWindowType=strWindowType+"fullscreen=no" + ",";

//height=number 指定窗口的高度(px),最小值为100px 
strWindowType=strWindowType+"height=470" + ",";
//width=number 窗口的宽度(px),最小值为100px.
strWindowType=strWindowType+"width=630" + ",";
//left=number 指定窗口的左沿离开屏幕左沿的距离(px). 
strWindowType=strWindowType+"left=150" + ",";
//top=number 指定窗口的上沿离开屏幕的距离(px).
strWindowType=strWindowType+"top=50" + ",";

//location=[yes|no|1|0] 指定是否出现地址栏. 
 

strWindowType
=strWindowType+"location=no" + ",";
//menubar=[yes|no|1|0] 指定是否出现菜单.
strWindowType=strWindowType+"menubar=no" + ",";
//resizable=[yes|no|1|0] 指定窗口是否可被改变大小. 
strWindowType=strWindowType+"resizable=yes" + ",";
//scrollbars=[yes|no|1|0] 指定是否出现滚动条. 
strWindowType=strWindowType+"scrollbars=yes" + ",";
//status=[yes|no|1|0] 指定是否出现状态栏 
strWindowType=strWindowType+"status=no" + ",";
//toolbar=[yes|no|1|0] 指定是否出现工具栏 .
strWindowType=strWindowType+"toolbar=no" + ",";

//打开窗口
if (WinName=="null"){
newwin
=window.open("","",strWindowType);
 
}

else{
window.open(WinName,
"",strWindowType); 
 
}

}

</script>

private void Page_Load(object sender, System.EventArgs e)
{
Page.RegisterStartupScript(
"ggg","<script>SetOpenWindowChild(WinName);</script>");
}

posted @ 2007-09-03 17:16  wj-conquer  阅读(389)  评论(0编辑  收藏  举报