Skip to content

Commit 76e569e

Browse files
committed
Format code
1 parent 6a21c5a commit 76e569e

File tree

2 files changed

+23
-12
lines changed

2 files changed

+23
-12
lines changed

index.css

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
* {
2-
font-family: system-ui, sans-serif;/*set default font to system-based font*/
3-
}
2+
font-family:
3+
system-ui, sans-serif; /*set default font to system-based font*/
4+
}

index.html

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,30 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html lang="en">
33
<head>
44
<title>Simple Progress Bar Web App</title>
5-
<link rel="stylesheet" href="index.css">
5+
<link rel="stylesheet" href="index.css" />
66
</head>
77
<body>
88
<h1>Simple Progress Bar Web App</h1>
9-
<!--progress input--><input type="number" id="progressInput">
10-
<!--progress bar--><progress id="progressBar" value="0" max="100"></progress>
11-
<!--update progress button--><button onclick="updateProgress()">Update Progress</button>
9+
<!--progress input--><input type="number" id="progressInput" />
10+
<!--progress bar--><progress
11+
id="progressBar"
12+
value="0"
13+
max="100"
14+
></progress>
15+
<!--update progress button--><button onclick="updateProgress()">
16+
Update Progress
17+
</button>
1218
<script>
13-
function updateProgress() {//update progress
14-
const progressInput = document.getElementById('progressInput');//progress input
15-
const progressBar = document.getElementById('progressBar');//progress bar
16-
progressBar.value = Math.max(0, Math.min(100, parseFloat(progressInput.value)));//update progress bar value from 0 to 100
19+
function updateProgress() {
20+
//update progress
21+
const progressInput = document.getElementById("progressInput"); //progress input
22+
const progressBar = document.getElementById("progressBar"); //progress bar
23+
progressBar.value = Math.max(
24+
0,
25+
Math.min(100, parseFloat(progressInput.value)),
26+
); //update progress bar value from 0 to 100
1727
}
1828
</script>
1929
</body>
20-
</html>
30+
</html>

0 commit comments

Comments
 (0)