Js将当前日期显示在浏览器的状态栏【搜藏】

<script language="javascript">        
  var curuser='<%=username%>';
  var intCallID=0;
  var MsgintCallID=0;
  var strStatus="登陆用户:<%=username%>          ";
  setInterval("GetNewFeatured()",1000);	
	    
  function GetNewFeatured()
  {
    var myDate = new Date();
    var month=myDate.getMonth();
    month=month+1;
    var xq=myDate.getDay();
    var theDay;
    switch (xq)  
    {  
               case 0:  
                 theDay="日";
                 break  
               case 6:  
                 theDay="六";
                 break  
               case 5:  
                 theDay="五";
                 break  
               case 4:  
                 theDay="四";
                 break  
               case 3:  
                 theDay="三";
                 break  
               case 2:  
                 theDay="二";
                 break  
               default:  
                 theDay="一";
    } 
    var DataTime=myDate.getFullYear()+"年"+month+"月"+myDate.getDate()+"日"+myDate.toLocaleTimeString()+" 星期"+theDay;
    window.status=strStatus+DataTime;
  } 
  window.status=strStatus;
</script> 
原文地址:https://www.cnblogs.com/linyc/p/1996229.html