Jump to content

Search the Community

Showing results for tags 'Clock'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • HTML/XHTML
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • XSLT/XSL-FO
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Languages

Found 2 results

  1. Would someone be able to comment this JavaScript clock for me please, thanks. <script>function show2(){if (!document.all&&!document.getElementById)returnthelement=document.getElementById? document.getElementById("tick2"): document.all.tick2var Digital=new Date()var hours=Digital.getHours()var minutes=Digital.getMinutes()var seconds=Digital.getSeconds()var dn="PM"if (hours<12)dn="AM"if (hours>12)hours=hours-12if (hours==0)hours=12if (minutes<=9)minutes="0"+minutesif (seconds<=9)seconds="0"+secondsvar ctime=hours+":"+minutes+":"+seconds+" "+dnthelement.innerHTML="<
  2. Hello, I'm creating a Javascript military clock widget and everything appears to be correct as far as I can tell, but it's not working. Any ideas? Here's my code: window.onload = function time_func(){var ct = new Date();var h = ct.getHours();var m = ct.getMinutes(); setTimeout(time_func(), 1000);} var $time = {military: h + ":" + m} [then in my HTML file]<script type="text/javascript">document.write($time.military);</script>
×
×
  • Create New...