Initial commit

This commit is contained in:
LucasV-IUT
2022-02-23 13:23:22 +01:00
commit 80ebdcadbc
9 changed files with 183 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
/* Get all elements */
const element = document.getElementById('time-value');
const startButton = document.getElementById('start-button');
const stopButton = document.getElementById('stop-button');
const clearButton = document.getElementById('clear-button');
/* Create a new Chronometer */
const chrono = new Chronometer(element);
/* Define actions of buttons */
startButton.addEventListener("click", () => {
chrono.start()
});
stopButton.addEventListener("click", () => {
chrono.stop()
});
clearButton.addEventListener("click", () => {
chrono.clear()
});