全てのウィンドウを閉じる

書式

 Windows.closeAll()

説明

 表示されている全てのウィンドウを閉じます。

サンプルコード [実行]

<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<title>Sample</title>
<link rel="stylesheet" href="default.css" type="text/css" media="all">
<script type="text/javascript" src="prototype.js"></script>
<script type="text/javascript" src="effects.js"></script>
<script type="text/javascript" src="window.js"></script>
<script type="text/javascript"><!--
var win01, win02, win03;
window.onload = function(){
win01 = new Window("win01", {
title: "ウィンドウ01", className: "dialog", top:100, left:60, zIndex: 100,
width:320, height:240, resizable: true, draggable:true });
win01.setDestroyOnClose();
win01.show();

win02 = new Window("win02", {
title: "ウィンドウ02", className: "dialog", top:150, left:120, zIndex: 101,
width:320, height:240, resizable: true, draggable:true });
win02.setDestroyOnClose();
win02.show();

win03 = new Window("win03", {
title: "ウィンドウ03", className: "dialog", top:200, left:180, zIndex: 102,
width:320, height:240, resizable: true, draggable:true });
win03.setDestroyOnClose();
win03.show();
}

function closeAll(){
Windows.closeAll();
}
// --></script>
</head>
<body>
<h1>全てのウィンドウを閉じる</h1>
<form>
<input type="button" value="閉じる" onClick="closeAll()">
</form>
</body>
</html>