Jump to content

rawman9x

Members
  • Posts

    5
  • Joined

  • Last visited

Posts posted by rawman9x

  1. Name:Nghĩa

    Age: 25

    From: Vietnam (I'm Vietnamese)

    Zodiac: Taurus

    Occupation: R&D

    Music: Rock, pop, R&B

    Hobbies:Listen music all day, sing, coding, travel, and talk to girl friend :)

    Favorite saying: "logic will get you from A to B. Imagination will take you everywhere"

  2. ok sir, I agree with you.

    Now, i'm having a problem and I need your help. How do I execute two work by click in the same button?

    It means that when I click button in the first, the clock display and in the second it stops.

  3. When I study js in our website, i see a good practice about "display a clock" http://www.w3schools.com/js/tryit.asp?filename=tryjs_timing_clock

    And I have an improve this solving. I think it's interesting :)

     

    <!DOCTYPE html>
    <html>
    <head>
    <title>time count 2</title>
    <meta charset="utf-8">
    </head>
    <body>
    <div id="div"></div>
    <script>
    setInterval(function(){
    var d = new Date();
    var h = d.getHours();
    var m = d.getMinutes();
    var s = d.getSeconds();
    if(h < 10){h = "0" + h;};
    if(m < 10){m = "0" + m;};
    if(s < 10){s = "0" + s;};
    document.getElementById("div").innerHTML = h + ":" + m + ":" + s;
    }, 500);
    </script>
    </body>
    </html>
×
×
  • Create New...