DIR : /home/kozerus/public_html/ko/timers14.html

/home/kozerus/public_html/ko

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="style.css">
    <script src="script.js" defer></script>
    <title>10 second timer</title>
</head>
<body bgcolor=linen>
    <main>
        <p class="downloadBegins">Your download begins in <span max="10" id="remainingTime"></span> seconds</p>
    </main>



<link rel="stylesheet" href="style.css">
<script src="index.js" defer></script>
<style>
body {
    background-color: #f7f8fc;
}
main {
    margin: 3rem auto;
    width: 50%;
    text-align: center;
}
	</style>
<script>
let remainingTimeElement = document.querySelector("#remainingTime"),
         	 secondsLeft = 10

const downloadTimer = setInterval( 
    () => {
        if (secondsLeft <= 0) clearInterval(downloadTimer)
        remainingTimeElement.value = secondsLeft
        remainingTimeElement.textContent = secondsLeft
        secondsLeft -= 1
    }, 
1000)
	</script>




</body>
</html>
//


koh5_pano



Your browser does not support the HTML5 canvas element.


Drag mouse to navigate.

Navigation





17.Aug.2010, Martin Wengenmayer