关于JavaScript的window对象的status属性

来源:互联网 发布:vb可以编写安卓软件 编辑:程序博客网 时间:2024/05/17 03:29
代码示例如下:
<!doctype html><html lang="en"> <head>  <meta charset="UTF-8">  <meta name="Generator" content="EditPlus?">  <meta name="Author" content="">  <meta name="Keywords" content="">  <meta name="Description" content="">  <title>状态栏显示当前时间</title> </head><script type="text/javascript"><!--function init(){//拿到当前时间var d = new Date() ;//设置状态栏的文本self.status = d.toLocaleString() ;   //self和window是等价的     //status:设置状态栏的文本setTimeout("init()",1000) ;}//--></script> <body onload = "init()">      </body></html>

在浏览器的左下角可以看到其运行结果如下:

0 0