Advertisement
Guest User

Untitled

a guest
May 14th, 2017
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.19 KB | None | 0 0
  1. <html>
  2.  
  3.  
  4. <head>
  5.  
  6. <script type="text/javascript">
  7. function funClock() {
  8. var runTime = new Date();
  9. var hours = runTime.getHours();
  10. var minutes = runTime.getMinutes();
  11. var seconds = runTime.getSeconds();
  12. var dn = "AM";
  13. if (hours >= 12) {
  14. dn = "PM";
  15. hours = hours - 12;
  16. }
  17. if (hours == 0) {
  18. hours = 12;
  19. }
  20. if (minutes <= 9) {
  21. minutes = "0" + minutes;
  22. }
  23. if (seconds <= 9) {
  24. seconds = "0" + seconds;
  25. }
  26. movingtime = "<b>"+ hours + ":" + minutes + ":" + seconds + " " + dn + "</b>";
  27. document.getElementById('clock').innerHTML = movingtime;
  28. setTimeout("funClock()", 1000)
  29. }
  30. window.onload = funClock;
  31.  
  32. </script>
  33.  
  34. </head>
  35.  
  36. <body onLoad="funClock()">
  37.  
  38. Currently, it's <span id="clock"
  39. style="position:relative;"></span>
  40.  
  41. <form name="input" action="" method="post">
  42.  
  43. <p style="font-family:arial; color:grey; font-size:20px;text-align:center"> <b> Username: </b> <input type="text" name="uname"/> <br /> </p>
  44. <p style="font-family:arial; color:grey; font-size:20px;text-align:center"> <b> Password: </b> <input type="password" name="pword" /> <br /> </p>
  45. <p style="text-align:center"> <input type="submit" value="Submit" /> </p>
  46.  
  47. </p>
  48.  
  49. </form>
  50.  
  51. </body>
  52. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement