ウィンドウのステータスバーに表示する文字を設定する

書式

 windowObj.setStatusBar(text)

windowObj : ウィンドウオブジェクト
text : ステータスバーにする文字

説明

 ウィンドウのステータスバーに表示する文字を設定するにはsetStatusBar()を使います。パラメータにはステータスバーに表示する文字を指定します。この文字は単なるテキストだけでなくHTMLを指定することができます。

サンプルコード [実行]

<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 win;
window.onload = function(){
win = new Window("win01", {
title: "Sample", className: "dialog",
top:100, left:10, zIndex: 100,
width:320, height:240,
resizable: true, draggable:true
});
win.setDestroyOnClose();
win.show();
}
function setStatusbar(){
win.setStatusBar("<b>"+$F("message")+"</b>");
}
// --></script>
</head>
<body>
<h1>ステータスバーを設定する</h1>
<form>
タイトル:<input type="text" id="message" value="BNN" size="20">
<input type="button" value="ステータスバーを設定" onClick="setStatusbar()">
</form>
</body>
</html>