mouseover button show date and time
-
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.
-
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.
Format the date object as required...
function showTime(obj) {
obj.title = (new Date()).toString();
}Thanks & Regards, Niral Soni
-
Format the date object as required...
function showTime(obj) {
obj.title = (new Date()).toString();
}Thanks & Regards, Niral Soni
It's Working?
-
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.
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!
-
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.