用JavaScript语言

来源:百度知道 编辑:UC知道 时间:2024/05/21 08:40:11
用JavaScript语言编程实现:关闭页面pop.html时弹出新的窗口(要求无菜单栏、无工具栏、无滚动条,无地址栏,窗口大小为宽200高100像素),窗口中显示内容还是pop.html,并且页面上要有超连接或者按钮能够点击后关闭页面窗口 代码怎么写???

<head>
<script language='javascript'>
<!--
function leave() {
var popUpSizeX=3;
var popUpSizeY=3;

var popUpLocationX=200;
var popUpLocationY=100;

// URL of the popUp
var popUpURL='/default.asp';

// ** do not edit below ***
splashWin = window.open('','x','fullscreen=1,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1');
splashWin.blur(); // Hide while updating
window.focus();
splashWin.resizeTo(popUpSizeX,popUpSizeY);
splashWin.moveTo(popUpLocationX,popUpLocationY);
splashWin.location=popUpURL;
}
//-->
</script>

</head>

<body onUnload="leave()">

<script>
function pop()
{
window.open("pop.html","location=no,menubar=no,titlebar=no,status=no,height=100,width=200,toolbar=no");
}
</