Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. mouseover button show date and time

mouseover button show date and time

Scheduled Pinned Locked Moved Web Development
htmltoolshelptutorial
5 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    dijitalninja
    wrote on last edited by
    #1

    Dear friends, I have button which has to show me date and time in a tooltip when I mouseover it. Does anyone know how could I write a piece of code to show me date and time as a tooltip when I put mouse over the button. I wrote this script which generates time and I'm stuck...don't know how to integrate it in my html code var d=new Date(); document.write(d); Thanks in advance.

    N H L 3 Replies Last reply
    0
    • D dijitalninja

      Dear friends, I have button which has to show me date and time in a tooltip when I mouseover it. Does anyone know how could I write a piece of code to show me date and time as a tooltip when I put mouse over the button. I wrote this script which generates time and I'm stuck...don't know how to integrate it in my html code var d=new Date(); document.write(d); Thanks in advance.

      N Offline
      N Offline
      Niral Soni
      wrote on last edited by
      #2

      Format the date object as required...

      function showTime(obj) {
      obj.title = (new Date()).toString();
      }

      Thanks & Regards, Niral Soni

      D 1 Reply Last reply
      0
      • N Niral Soni

        Format the date object as required...

        function showTime(obj) {
        obj.title = (new Date()).toString();
        }

        Thanks & Regards, Niral Soni

        D Offline
        D Offline
        David Kroj
        wrote on last edited by
        #3

        It's Working?

        Website Development Company | Web Development Company

        1 Reply Last reply
        0
        • D dijitalninja

          Dear friends, I have button which has to show me date and time in a tooltip when I mouseover it. Does anyone know how could I write a piece of code to show me date and time as a tooltip when I put mouse over the button. I wrote this script which generates time and I'm stuck...don't know how to integrate it in my html code var d=new Date(); document.write(d); Thanks in advance.

          H Offline
          H Offline
          harry
          wrote on last edited by
          #4

          Please try this:

          <html><head><title>
          </title></head>
          <script>
          function showTime(obj) {
          obj.title = (new Date()).toString();
          }
          </script>
          <input type="button" value="Time" onmouseover="showTime(this)">
          </html>

          Always do you best,what you plant you will harvest later!

          1 Reply Last reply
          0
          • D dijitalninja

            Dear friends, I have button which has to show me date and time in a tooltip when I mouseover it. Does anyone know how could I write a piece of code to show me date and time as a tooltip when I put mouse over the button. I wrote this script which generates time and I'm stuck...don't know how to integrate it in my html code var d=new Date(); document.write(d); Thanks in advance.

            L Offline
            L Offline
            Lost User
            wrote on last edited by
            #5

            <input type="button" value="Time" onmouseover="showTime(this)">

            function showTime(obj) {
            obj.title = (new Date()).toString();
            }

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups