Init.
This commit is contained in:
34
testtimerm.php
Normal file
34
testtimerm.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html>
|
||||
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<button onclick="atack()" id="go_btn">go</button>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
var cgo = 100;
|
||||
|
||||
var tgo;
|
||||
|
||||
var timer_is_on = 0;
|
||||
|
||||
timedCount();
|
||||
|
||||
function timedCount() {
|
||||
|
||||
document.getElementById("go_btn").innerHTML = cgo;
|
||||
|
||||
if (cgo > 0)
|
||||
|
||||
{
|
||||
|
||||
tgo = setTimeout(timedCount, 50);
|
||||
|
||||
cgo = cgo - 10;
|
||||
|
||||
Reference in New Issue
Block a user