NoNameCracksInc

HTML/JVS code

May 8th, 2013
335
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 0.93 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <body>
  5. <body background="sky.jpg">
  6.      <script>
  7.      function myfunction()
  8.      {
  9.      var x;
  10.      var date=new Date().getDay();
  11.      switch(date)
  12.      {
  13.      case 0:
  14.      x="Sunday";
  15.      break;
  16.      case 1:
  17.      x="Monday";
  18.      break;
  19.      case 2:
  20.      x="Thuesday";
  21.      break;
  22.      case 3:
  23.      x="Wednesday";
  24.      break;
  25.      case 4:
  26.      x="Thursday";
  27.      break;
  28.      case 5:
  29.      x="Friday";
  30.      break;
  31.      case 6:
  32.      x="Saturday";
  33.      }
  34.      document.getElementById("deemo").innerHTML=x;
  35.      document.getElementById("demo").innerHTML=new Date();
  36. }
  37.      </script>
  38. </head>
  39. <p id="demo">Click to show time</p>
  40. <p id="deemo">Click to show day</p>
  41. <a href="http://pastebin.com/u/NoNameCracksInc">www.pastebin.com</a>
  42. <button type="button" onclick="myfunction()">Show date</button>
  43. <button type="button" onclick="alert('Testing website')">INFO</button>
  44. </body>
  45. </html>
Advertisement
Add Comment
Please, Sign In to add comment