Javascripts > Javascript Clocks > Clock Talk
Script Title: Clock Talk
Description: You can set a time for an alert to pop up and say something to your visitor.
Example: Available
Copy the following code into your <HEAD></HEAD> tags.<script language="javascript"> <!--This script belongs to Blade: Aaron Connelly--> <!--All Rights reserved 2001--> <!--For non-comercail use only. Else contact at MAUWDIB@aol.com--> //If you only want one time alert. Just erease the others //If you want more then three. Just copy the code and enter the detials. <!--Begin function timeing(){ var today = new Date() var hour= today.getHours() var min = today.getMinutes() var sec = today.getSeconds() var P="pm" if(hour>12){ P="am" hour=hour-12 } if(hour==0) hour=12 if(min<=9){ min="0"+min } if(sec<=9){ sec="0"+sec } <!--Set the time of the first alert. Be sure to set it to pm, or am--> if(hour==12 && min==06 && sec==30 && P=="pm"){ <!--Type within the quotation marks--> alert("I'ts time to go!") } if(hour==12 && min==00 && sec==00 && P=="am"){ alert("I'ts 12:00:00 midnight! GO to BED!") } if(hour==7 && min==00 && sec==00 && P=="am"){ alert("It's time to get some coffee!") } var time = hour + ":" + min + ":" + sec + P window.status=time setTimeout("timeing()",1000) } //end--> </script>
Copy the following code INTO your <BODY> tag.onload="timeing()"
Enter your name and email address to have this script sent right to your Inbox for later viewing. First Name Last Name Email