www.webdeveloper.com
Results 1 to 2 of 2

Thread: not workingb properly in google chrome and firefox.

  1. #1
    Join Date
    Sep 2013
    Posts
    2

    Post not workingb properly in google chrome and firefox.

    <meta charset="utf-8" />
    <title> its a new dawn </title>
    </head>
    <body>
    <h1> lets get started </h1>
    <div>

    <h2> Today's date is:</h2>
    <span id= "calendar"></span>
    <input type="button" id="myButton" value= "Get Date" onclick="showDate;"/>

    </div>

    <script type="text/javascript">
    function showDate()
    {
    var today =new Date();
    var Calender = document.getElementById("calender");
    var mybutton = document.getElementById("myButton");
    myCalener.innerHTML = today.toDateString();
    myButton.value = "hurray kingbayode!";

    }
    </script>
    </body>
    </html>

  2. #2
    Join Date
    Jun 2004
    Location
    Portsmouth UK
    Posts
    2,683
    Code:
    <html>
    <head>
    <title> its a new dawn </title>
    </head>
    <body>
    <h1> lets get started </h1>
    <div>
    
    <h2> Today's date is:</h2>
    <span id= "calender"></span>
    <input type="button" id="myButton" value= "Get Date" onclick="showDate();"/>
    
    </div>
    
    <script type="text/javascript">
    function showDate()
    {
    var today =new Date();
    var myCalender = document.getElementById("calender");
    var mybutton = document.getElementById("myButton");
    myCalender.innerHTML = new Date().toDateString();
    myButton.value = "hurray kingbayode!";
    
    }
    </script>
    </body>
    </html>
    Vic

    God loves you and will never love you less.

    http://www.vicsjavascripts.org/Home.htm
    If my post has been useful please donate to http://www.operationsmile.org.uk/

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

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



Recent Articles