function count_stop(){ console.log(count_stop); clearInterval(intervalid); start_flag = false; } function count_reset(){ console.log(count_reset); var timer = document.getElementById("timer"); clearInterval(intervalid); start_flag = false; to_timeup = max; padding(); timer.style.color = "black"; } window.onload = function(){ //console.log("mumei"); padding(); var startbutton=document.getElementById("startbutton"); startbutton.addEventListener("click",count_start,false); var stopbutton=document.getElementById("stopbutton"); stopbutton.addEventListener("click",count_stop,false); var resetbutton=document.getElementById("resetbutton"); resetbutton.addEventListener("click",count_reset,false); } </script> </head> <body> <h1 id="timer"></h1> <button id="startbutton">start</button> <button id="stopbutton">stop</button> <button id="resetbutton">reset</button> </body> </html>
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up