ウィンドウサイズを指定する

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="ja">
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<title>Sample</title>
<link rel="stylesheet" href="css/default.css" type="text/css" media="all">
<link rel="stylesheet" href="css/main.css" type="text/css" media="all">
<script type="text/javascript" src="js/prototype.js" charset="shift_jis"></script>
<script type="text/javascript" src="js/effects.js" charset="shift_jis"></script>
<script type="text/javascript" src="js/window.js" charset="shift_jis"></script>
<script type="text/javascript"><!--
var win;
function openWin(){
win = new Window("win01", {
title: "Sample",
className: "dialog",
top:150, left:80, zIndex: 100,
width: 400, height:300,
resizable : false
});
win.setDestroyOnClose();
win.show();
}
function setWinSize(w,h){
win.setSize(w,h);
}
// --></script>
</head>
<body>
<h1>ウィンドウのサイズを指定する</h1>
<form method="get" action="./win.cgi">
<input type="button" value="ウィンドウを開く" onClick="openWin()">
<input type="button" value="320x240に変更" onClick="setWinSize(320,240)">
<input type="button" value="480x360に変更" onClick="setWinSize(480,360)">
</form>
</body>
</html>
サンプルを実行
[戻る]
prototype.jsパーフェクトリファレンス説明などは本書を参考にしてください。