window.open()--窗口参数详解

news/2025/2/23 6:06:27
window.open()--窗口参数详解!
window.open()方法中,窗口控制参数的详细定义:
alwaysLowered innerWidth screenY
alwaysRaised left scrollbars
channelmode location status
dependent menubar titlebar
directories outerWidth toolbar
fullscreen outerHeight top
height menubar width
hotkeys resizable z-lock
innerHeight screenX  


alwaysLowered
  Internet Explorer:不支持

  Navigator:版本 4+

  指定窗口总是保留在堆栈的最下面。换言之,不管新窗口是否激活,总是其他窗口下。

  window.open("alwayslowered.html", "_blank", "alwaysLowered");

alwaysRaised
  Internet Explorer:不支持

  Navigator:版本 4+

  指定窗口总是保留在堆栈的最上面。换言之,不管新窗口是否激活,总是其他窗口上。

  window.open("alwaysraised.html", "_blank", "alwaysRaised");

channelmode
  Internet Explorer:版本 4+

  Navigator:不支持

  指定是否按照剧场模式显示窗口,以及是否显示频道区。

  window.open("channelmode.html", "_blank", "channelmode");

dependent
  Internet Explorer:不支持

  Navigator:版本 4+

  定义是否窗口成为当前打开窗口的依赖子窗口。依赖窗口就是当它的父窗口关闭时,它也随即关闭。在windows平台上,一个依赖窗口不会在任务栏上显示。

  window.open("dependent.html", "_blank", "dependent");

directories
  Internet Explorer:所有版本

  Navigator:所有版本

  指定是否显示目录按钮(比如众所周知的"What's Cool" and "What's New" 按钮)。Internet Explorer将这些目录按钮引用为链接工具栏,Navigator(版本4和以上)称之为个人工具栏。

  window.open("directories.html", "_blank", "directories");

fullscreen
  Internet Explorer:版本 4+

  Navigator:不支持

  定义是否按照全屏方式打开浏览器。请小心使用全屏模式,因为在这种模式下,浏览器的标题栏和菜单都被隐藏,所有你应该提供一个按钮或者其他可视的线索来帮助用户关闭这个窗口。当然,使用热键ALT+F4也能关闭窗口。

  window.open("fullscreen.html", "_blank", "fullscreen");

height
  Internet Explorer:所有版本

  Navigator:所有版本

  以象素pixel为单位定义窗口文档显示区域的高度,最小数值是100。如果仅仅定义高度,Internet Explorer使用给定的高度和默认的宽度。对于Navigator,如果不同时指定width或者innerWidth,那么就将忽略这个属性。

  window.open("height.html", "_blank", "height=200,width=300");

hotkeys
  Internet Explorer:不支持

  Navigator:版本 4+

  如果没有定义(或者为0),那么就屏蔽了没有菜单条的新窗口的大部分热键。但是安全以及退出热键仍然保留。

  window.open("hotkeys.html", "_blank", "hotkeys=0,menubar=0");

innerHeight
  Internet Explorer:不支持

  Navigator:版本 4+

  以象素pixel为单位定义窗口文档显示区域的高度,最小数值是100。在Navigator版本4中,这个特征替换height,为得是保持向后兼容。对于Navigator,如果不同时指定width或者innerWidth,那么就将忽略这个属性。

  window.open("innerheight.html", "_blank", "innerHeight=200,innerWidth=300");

innerWidth
  Internet Explorer:不支持

  Navigator:版本 4+

  以象素pixel为单位定义窗口文档显示区域的宽度,最小数值是100。在Navigator版本4中,这个特征替换width,为得是保持向后兼容。对于Navigator,如果不同时指定height或者innerHeight,那么就将忽略这个属性。

  window.open("innerwidth.html", "_blank", "innerHeight=200,innerWidth=300");

left
  Internet Explorer:版本 4+

  Navigator:不支持

  以象素为单位定义窗口的X左标。

  window.open("left.html", "_blank", "left=20");

location
  Internet Explorer:所有版本

  Navigator:所有版本

  定义是否显示浏览器中供地址URL输入的文本域。

  window.open("location.html", "_blank", "location");

menubar
  Internet Explorer:所有版本

  Navigator:所有版本

  定义是否显示菜单条(菜单条位于窗口顶部,包括“文件”和“编辑”等)。

  window.open("menubar.html", "_blank", "menubar");

outerHeight
  Internet Explorer:不支持

  Navigator:版本 4+

  以象素为单位定义窗口(它的外部边界)的总高度,最小数值比100多一些,因为窗口内容区域的高度必须至少是100。如果没有同时定义outerWidth,Navigator将忽视这个特征。

  window.open("outerheight.html", "_blank", "outerHeight=200,outerWidth=300");

outerWidth
  Internet Explorer:不支持

  Navigator:版本 4+

  以象素为单位定义窗口(它的外部边界)的总宽度,最小数值比100多一些,因为窗口内容区域的宽度必须至少是100。如果没有同时定义outerHeight,Navigator将忽视这个特征。

  window.open("outerwidth.html", "_blank", "outerHeight=200,outerWidth=300");

resizable
  Internet Explorer:所有版本

  Navigator:所有版本

  定义是否窗口可以通过它的边界进行大小缩放控制。依赖于平台不同,用户也许还有其他改变窗口大小的方法。

  window.open("resizable.html", "_blank", "resizable");

screenX
  Internet Explorer:不支持

  Navigator:版本 4+

  以象素为单位定义窗口的X坐标。

  window.open("screenx.html", "_blank", "screenX=20");

screenY
  Internet Explorer:不支持

  Navigator:版本 4+

  以象素为单位定义窗口的Y坐标。

  window.open("screeny.html", "_blank", "screenY=20");

scrollbars
  Internet Explorer:所有版本

  Navigator:所有版本

  定义是否激活水平和垂直滚动条。

  window.open("scrollbars.html", "_blank", "scrollbars");

status
  Internet Explorer:所有版本

  Navigator:所有版本

  定义是否在窗口的下部添加状态栏。

  window.open("status.html", "_blank", "status");

titlebar
  Internet Explorer:Version 5+

  Navigator:版本 4+

  定义是否显示窗口的标题栏。在Internet Explorer中,除非调用者是一个HTML应用程序或者一个可信任的对话框,那么这个特征是被屏蔽的。

  window.open("titlebar.html", "_blank", "titlebar=0");

toolbar
  Internet Explorer:所有版本

  Navigator:所有版本

  定义是否显示浏览器工具栏(位于窗口的上部,包括“后退”和“向前”)。

  window.open("toolbar.html", "_blank", "toolbar");

top
  Internet Explorer:版本 4+

  Navigator:不支持

  以象素为单位定义窗口的纵坐标。

  window.open("top.html", "_blank", "top=20");

width
  Internet Explorer:所有版本

  Navigator:所有版本

  以象素pixel为单位定义窗口文档显示区域的宽度,最小数值是100。如果仅仅定义宽度,Internet Explorer使用给定的宽度和默认的高度。对于Navigator,如果不同时指定height或者innerHeight,那么就将忽略这个属性。

  window.open("width.html", "_blank", "height=200,width=300");

z-lock
  Internet Explorer:不支持

  Navigator:版本 4+

  定义窗口激活时不在堆栈中浮起,就是说,新窗口当被激活时并不能位于其他窗口之上。

  window.open("zlock.html", "_blank", "z-lock"); 
 

http://www.niftyadmin.cn/n/498748.html

相关文章

sql 分组统计_SQL汇总分析

一、如何进行汇总分析汇总函数count(<列名>) 求某列的行数&#xff0c;count(<列名>)列出除空值以外的行&#xff1b;count(*) 列出全部的行&#xff08;包括空值&#xff09;。distinct(<列名>)删除重复值sum(<列名>)对某列数据求和&#xff0c;只能对…

c语言链表回文判断,如何判断一个单向链表是否为回文链表(Palindr

满意答案suweichun42017.03.17采纳率&#xff1a;50% 等级&#xff1a;10已帮助&#xff1a;773人/*** Definition for singly-linked list.* struct ListNode {* int val;* ListNode *next;* ListNode(int x) : val(x), next(NULL) {}* };*/class Solution {pu…

python中pixels函数_Python的PIL库中getpixel方法的使用

getpixel函数是用来获取图像中某一点的像素的RGB颜色值&#xff0c;getpixel的参数是一个坐标点。对于图象的不同的模式&#xff0c;getpixel函数返回的值有所不同。1.RGB模式from PIL import ImageimImage.open(d:/22.jpg)print(im.mode)print(im.getpixel((0,0)))结果为RGB(1…

.NET中Redis安装部署及使用方法简介

Redis是一个用的比较广泛的Key/Value的内存数据库&#xff0c;新浪微博、Github、StackOverflow 等大型应用中都用其作为缓存&#xff0c;Redis的官网为http://redis.io/。 Redis 是一个key-value存储系统。和Memcached类似&#xff0c;它支持存储的value类型相对更多&#xff…

C语言深度优先拓扑排序算法,深度优先搜索及拓扑排序(链式前向星实现)

算法导论&#xff1a;P330#include #include #include #include #define white 0#define gray 1#define black 2#define NIL -1using namespace std;typedef struct node{int w;int to;int next;}node;const int MAX 1000;const int M 500000;node edge[M];int head[MAX], n,…

Linux下访问Windows共享文件的方法

首先启动/etc/init.d/smb 启动方法:./smb start 方法&#xff11;&#xff1a;mkdir /mnt/temp 建立一个文件夹. 然后使用 smbmount //share/folder /mnt/temp share 是你要访问的机器名称 folder 是共享文件夹最后直接访问/mnt/temp 就可以了 取消使用umount /mnt/temp 方法…

杭电 1176 免费馅饼

Description 都说天上不会掉馅饼&#xff0c;但有一天gameboy正走在回家的小径上&#xff0c;忽然天上掉下大把大把的馅饼。说来gameboy的人品实在是太好了&#xff0c;这馅饼别处都不掉&#xff0c;就掉落在他身旁的10米范围内。馅饼如果掉在了地上当然就不能吃了&#xff0c;…

android 隐式启动服务,安卓Activity隐式启动全面解析

前言安卓有两种方式启动Activity&#xff0c;一种是显示启动&#xff0c;另外一种是隐式启动。显示启动我们在项目中经常用到&#xff0c;大家也都比较熟悉。今天我们主要讲解一下隐式启动。隐式启动常用于不同应用之间的跳转(例如打开支付宝微信的支付页面)&#xff0c;也可用…