Simple Timer

[Total: 0    Average: 0/5]

This will ask the user for a time (minutes) to count down.

Body Code:

<script language="JavaScript">
  var alarmId;
  function alarmFunc() {
    // Sound the alarm call. You could play a sound here
    // as well, by using location=soundfile, etc.
    alert("ALARM CALL!");
  function startTimeout(id) {
    var minutes = prompt("How many minutes?", 0);
    // Time-outs are measured in milliseconds, so if the
    // user enters 1 minute, we need to multiply by 60000.
    alarmId = setTimeout("alarmFunc()", minutes*60000);

<input type=button 
<input type=button value="Cancel"

Times Viewed: 1

Leave a Reply

Your email address will not be published. Required fields are marked *