使用按钮控制以何种方式打开新窗口的属性介绍


  本文标签:按钮控制,新窗口,窗口属性

<!-- 把下面代码放到<body>区域中 -->
复制代码 代码如下:

<form>
<div align="left">
<input type="button" Value="打开新窗口"
ONCLICK="window.open(index.htm,Sample,toolbar=yes,location=no,directories=no,status=no,menubar=yes,
scrollbars=no,resizable=no,copyhistory=yes,width=300,height=200,left=100,top=100)">
</form>

<!--说明:将其中的链接文件test.htm改为你的路径,窗口参数如下:
toolbar=yes, 显示工具条
location=yes,显示网址栏
directories=no,导航条
status=no,状态条
menubar=yes,菜单
scrollbars=yes,滚动条
resizable=no,是否可以改变大小
copyhistory=yes,历史按钮
width=300,宽
height=200高
left=100,距离左边100
top=100,距离顶端100-->