HTML DOM 快速導覽 - window 物件的屬性 status

window.status 用以設定或存取狀態列。



舉例如下
1
2
3
4
5
6
7
8
9
10
function run() {
    window.status = "There is no spoon.";   
}
 
/* 《程式語言教學誌》的範例程式
     檔名:window043.js
     功能:示範 JavaScript 程式
     作者:張凱慶
     時間:西元 2011 年 8 月 */


此例在狀態列中寫入 "There is no spoon."
2
window.status = "There is no spoon.";


我們以下面的 HTML 文件載入
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<!DOCTYPE html>
<html>
<head>
<title>HTML DOM DEMO</title>
<script src="window043.js" type="text/javascript"></script>
</head>
<body>
<input type="button" value="RUN" onclick="run();">
</body>
</html>
 
<!-- 《程式語言教學誌》的範例程式
     檔名:window043.html
     功能:示範 JavaScript 程式
     作者:張凱慶
     時間:西元 2011 年 8 月 -->


瀏覽器 (browser) 開啟,點擊 RUN 後結果如下



中英文術語對照
屬性attribute
元素element
瀏覽器browser


您可以繼續參考
window 物件


相關目錄
HTML DOM 快速導覽
JavaScript 教材
首頁


參考資料
https://developer.mozilla.org/en/DOM/window.status

沒有留言: