首页 > 语言 > JavaScript > 正文

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

2024-05-06 14:20:28
字体:
来源:转载
供稿:网友
<!-- 把下面代码放到<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-->
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表

图片精选