Javascript language

R4R® Javascript Javascript Example
(追記) (追記ここまで)
(追記) (追記ここまで)
Digital clock in the status line

How to show a digital clock in the status line

Step 1. Written below code in your application.

<html>
<body onload="displyTime_inStatusLine()">
<script language="javascript">
function displyTime_inStatusLine()
{
 var d = new Date(); 
 var h = d.getHours(); 
 var m = d.getMinutes(); 
 var ampm = (h >= 12)?"PM":"AM"; 
 if (h > 12) h -= 12; 
 if (h == 0) h = 12; 
 if (m < 10) m = "0" + m; 
 var t = h + ':' + m + ' ' + ampm; 
 defaultStatus = t; 
 setTimeout("displyTime_inStatusLine()", 60000); 
}
</script>
</body>
</html>
(追記) (追記ここまで)

Step 2. Run the Application.

l (追記) (追記ここまで)
Copyright ©2021-22 r4r.co.in, all rights reserved. Theguestspost.com
Sitemap
Career
Post comment
About us
Subscription
Unsubscription

AltStyle によって変換されたページ (->オリジナル) /