Window.status - ステータス
statusは、Windowのプロパティです。ウィンドウのステータスを表す文字列を返します。値を代入して設定できます。以前はブラウザのステータスバーにメッセージとして表示されたようです。
概要
- 名前
- status
- 所属
- Window
- IDL
attribute DOMString status;
- 仕様書
- https://html.spec.whatwg.org/multipage/window-object.html#dom-window-status
説明
ステータスを表す文字列を返す。何も設定されていない場合は空の文字列を返す。
デモ
Window.statusのデモです。
<!-- このコードは編集できます。 -->
<!DOCTYPE html>
<html>
<head>
<style>
body { word-break: break-all ; }
div#result { white-space: pre-wrap ; }
</style>
</head>
<body>
<div id="result"></div>
<script>
var resultElement = document.getElementById( "result" ) ;
// 代入
window.status = "No Problem!!" ;
// 取得
var value = window.status ;
console.log( value ) ;
resultElement.appendChild( document.createTextNode( value ) ) ;
</script>
</body>
</html>
サポート状況
Chrome | Firefox | Safari | Edge | IE | Opera | iOS Safari | Android |
---|---|---|---|---|---|---|---|
● | ● | ● | ● | ● | ● | ● | ● |
関連記事
- XMLHttpRequest.status
- statusは、XMLHttpRequestのプロパティです。レスポンスのステータスコードを返します。
- status_changed
- ステータスが変化した時に発火するイベント。
- XMLHttpRequest.statusText
- statusTextは、XMLHttpRequestのプロパティです。レスポンスのステータスのメッセージを返します。例えば、HTTP/1.1 200 OKの"OK"、HTTP/1.1 404 Not Foundの"Not Found"の部分です。ただし最近の、ステータスコードだけを返すサーバーの場合だと、メッセージ部分は空の文字列になります。
- Window.statusbar
- statusbarは、Windowのプロパティです。ステータスバーを表すBarPropを返します。