Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 470fc84

Browse files
fix timer output show
1 parent 16fc5b4 commit 470fc84

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

‎main.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ var outputMinute = document.getElementById("outputMinute");
66
var outputSecond = document.getElementById("outputSecond");
77
var startBtn = document.getElementById("startBtn");
88
var stopBtn = document.getElementById("stopBtn");
9-
var stopWatch;
9+
var timer;
1010
var outputContainer = document.getElementById("outputContainer");
1111

1212
function SetTimerValue()
@@ -21,10 +21,12 @@ function StartClock()
2121
if(inputHour > 0 || inputMinute > 0 || inputSecond > 0)
2222
{
2323
outputHour.innerHTML = FormatTime(inputHour);
24+
outputMinute.innerHTML = FormatTime(inputMinute);
25+
outputSecond.innerHTML = FormatTime(inputSecond);
2426
outputContainer.style.display = "flex";
2527
startBtn.style.display = "none";
2628
stopBtn.style.display = "inline-block";
27-
stopWatch = setInterval(myClock, 1000);
29+
timer = setInterval(myClock, 1000);
2830
}
2931
}
3032

@@ -33,7 +35,7 @@ function StopClock()
3335
startBtn.style.display = "inline-block";
3436
stopBtn.style.display = "none";
3537

36-
clearInterval(stopWatch);
38+
clearInterval(timer);
3739
}
3840

3941
function ResetClock()

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /