Widget:V: Difference between revisions
Jump to navigation
Jump to search
Gerald Chi (talk | contribs) mNo edit summary |
Gerald Chi (talk | contribs) mNo edit summary |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
<includeonly> | <includeonly> | ||
<script> | <html> | ||
<head> | |||
<script type="text/javascript"> | |||
var c=0; | |||
var t; | |||
var timer_is_on=0; | |||
function | function timedCount() | ||
{ | { | ||
document.getElementById('txt').value=c; | |||
c=c+1; | |||
t=setTimeout("timedCount()",1000); | |||
} | } | ||
function doTimer() | |||
{ | |||
if (!timer_is_on) | |||
{ | |||
timer_is_on=1; | |||
timedCount(); | |||
} | |||
} | |||
</script> | </script> | ||
</head> | |||
<body> | |||
<form> | <form> | ||
<input type="button" value=" | <input type="button" value="Asystole" onClick="timedCount()"> | ||
<input type="text" id="txt" | <input type="text" id="txt"> | ||
</form> | </form> | ||
</body> | |||
</html> | |||
</includeonly> | </includeonly> |