怎样隐藏地址栏和工具栏
各位好,小弟今天在写程序时碰到了一个问题,想请大家帮忙解决一下,我想请问大家怎么用JavaScript实现把一个页面在显示时,隐藏其地址栏和工具栏,也可以用其它方法,请知道怎样实现的各位告诉我一声,先在此谢谢各位了!
------解决方案-------------------- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN ">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<script>
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=250 " + ", ";
//width=number 窗口的宽度(px),最小值为100px.
strWindowType=strWindowType+ "width=480 " + ", ";
//left=number 指定窗口的左沿离开屏幕左沿的距离(px).
strWindowType=strWindowType+ "left=200 " + ", ";
//top=number 指定窗口的上沿离开屏幕的距离(px).
strWindowType=strWindowType+ "top=150 " + ", ";
//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=no " + ", ";
//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);
return newwin;
}
else{
window.open(WinName, " ",strWindowType);
return null;
}
}
</script>
</HEAD>
<BODY>
<a href= "javascript:SetOpenWindowChild( 'null '); "> 点这里 </a>
</BODY>
</HTML>