|
|
@ -18,7 +18,7 @@
|
|
|
|
</head>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<body>
|
|
|
|
<div>
|
|
|
|
<div>
|
|
|
|
T ‐ <input type="text" id="time" size="12" placeholder="hh : mm : ss">
|
|
|
|
T − <input type="text" id="time" size="8" placeholder="hh:mm:ss">
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<script>
|
|
|
|
<script>
|
|
|
|
((t = document.querySelector("#time"), on = false, tmr = undefined) =>
|
|
|
|
((t = document.querySelector("#time"), on = false, tmr = undefined) =>
|
|
|
@ -30,7 +30,7 @@
|
|
|
|
t.blur(),
|
|
|
|
t.blur(),
|
|
|
|
tmr = setInterval(() => s == 0
|
|
|
|
tmr = setInterval(() => s == 0
|
|
|
|
? (on = false, clearInterval(tmr), t.value = "")
|
|
|
|
? (on = false, clearInterval(tmr), t.value = "")
|
|
|
|
: t.value = (new Date(s-- * 1000)).toISOString().substr(11, 8).replace(/:/g, ' : '), 1000)
|
|
|
|
: t.value = (new Date(s-- * 1000)).toISOString().substr(11, 8).replace(/:/g, ':'), 1000)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
: 0
|
|
|
|
: 0
|
|
|
|
)
|
|
|
|
)
|
|
|
|