Results 1 to 1 of 1

Thread: word clock

  1. #1
    Join Date
    Jun 2013
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default word clock

    Hi,

    I have some code for a word clock, I am new in to Javascript, and Ill hope someone can help me out.

    The word clock I have is made in Chinese, I mean the time is with Chinese Characters,

    The Chinese time has 3 time frame's, like morning, noon and afternoon.

    - from 6 till 12 its morning (06.00 ~ 12.00)
    - from 12 untill 2 its noon (12.00 ~ 14.00)
    - from 2 untill 6 its afternoon ( 14.00 ~ 06.00)

    The clock I have is combine, CSS, JAVA and HTML..

    The have Java script looks like this

    Code:
      //AM or PM
      if (hours>=12) {
        document.getElementById("timeframe2").style.color = "#F00";
        AorP="P.M.";
        hours -=12;
      } else {
        document.getElementById("timeframe1").style.color = "#F00";
        AorP="A.M.";
    	
      }
    The HTML looks like this, I changed already for 3 timeframes, but I don't know how to handle in the Javascript

    Code:
    <p><span><span id="timeframe1">上午</span>&nbsp; 
      <span id="timeframe2">中午</span> <span id="timeframe3">下午</span><br />
      
      <br />
      </span>
    Can someone can help me.

    Thx for reading and your time
    Last edited by james438; 06-24-2013 at 02:47 PM.

Similar Threads

  1. Mixing a word in another word
    By letom in forum PHP
    Replies: 2
    Last Post: 05-15-2013, 05:20 PM
  2. 12h to 24h clock
    By intakep in forum HTML
    Replies: 8
    Last Post: 09-15-2010, 08:03 AM
  3. Replies: 4
    Last Post: 04-29-2009, 08:21 AM
  4. A Clock
    By pwnage in forum JavaScript
    Replies: 0
    Last Post: 06-09-2006, 12:01 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •