大家好,我是小小根,我来为大家解答以上问题。打开网页电脑下边的工具栏就没有了,如何实现打开网页时没有地址栏和工具栏很多人还不知道,现在让我们一起来看看吧!
1、通过WINDOW的OPEN函数打开窗口,设置窗口属性
2、给你两个版本:
3、版本1:
4、function SetOpenWindowChild(WinName){
5、 var strWindowType="";
6、 var newwin=null;
7、 //directories=[yes|no|1|0] 指定是否出现链接工具栏.
8、 strWindowType=strWindowType+"directories=no" + ",";
9、 //channelmode=[yes|no|1|0] (IE4.0 only)为1时以'全屏模式'(相当于按F11)打开,并出现频道栏.
10、 strWindowType=strWindowType+"channelmode=no" + ",";
11、 //fullscreen=[yes|no|1|0] (IE4.0 only) 指定全屏模式打开,如果忘了放置关闭按钮,只好用ALT+F4了.
12、 strWindowType=strWindowType+"fullscreen=no" + ",";
13、 //height=number 指定窗口的高度(px),最小值为100px
14、 strWindowType=strWindowType+"height=250" + ",";
15、 //width=number 窗口的宽度(px),最小值为100px.
16、 strWindowType=strWindowType+"width=480" + ",";
17、 //left=number 指定窗口的左沿离开屏幕左沿的距离(px).
18、 strWindowType=strWindowType+"left=200" + ",";
19、 //top=number 指定窗口的上沿离开屏幕的距离(px).
20、 strWindowType=strWindowType+"top=150" + ",";
21、 //location=[yes|no|1|0] 指定是否出现地址栏.
22、 strWindowType=strWindowType+"location=no" + ",";
23、 //menubar=[yes|no|1|0] 指定是否出现菜单.
24、 strWindowType=strWindowType+"menubar=no" + ",";
25、 //resizable=[yes|no|1|0] 指定窗口是否可被改变大小.
26、 strWindowType=strWindowType+"resizable=no" + ",";
27、 //scrollbars=[yes|no|1|0] 指定是否出现滚动条.
28、 strWindowType=strWindowType+"scrollbars=yes" + ",";
29、 //status=[yes|no|1|0] 指定是否出现状态栏
30、 strWindowType=strWindowType+"status=no" + ",";
31、 //toolbar=[yes|no|1|0] 指定是否出现工具栏 .
32、 strWindowType=strWindowType+"toolbar=no" + ",";
33、 //打开窗口
34、 if (WinName=="null"){
35、 newwin=window.open("","",strWindowType);
36、 return newwin;
37、 }
38、 else{
39、 window.open(WinName,"",strWindowType);
40、 return null;
41、 }
42、}
43、版本2:
44、window.open('./TelFaxHelp.aspx?SupplierCode=' + strSupplierCode +'&LeadClassCode=' + strLeadClassCode,'_Help', 'height=150,WIDTH=250,left=200,top=200,toolbar=no,scrollbars=no,menubar=no,resizable=yes',1);
45、其实这两个都是一样的!
46、不知道你明白了没有?
本文到此讲解完毕了,希望对大家有帮助。