<!DOCTYPE html>
<
html
>
<
head
>
<
title
>
How to set and get the value of
Progress Bar using JavaScript ?
</
title
>
</
head
>
<
body
style
=
"text-align: center;"
>
<
h1
style
=
"color:green;"
>
GeeksforGeeks
</
h1
>
<
h2
>
Set and Get the value of Progress
Bar using JavaScript
</
h2
>
<
P
id
=
"GFG"
>
Downloading progress for a song:
</
p
>
<
button
onclick
=
"myGeeks()"
>
Submit
</
button
>
<
script
>
function myGeeks() {
// Create a progress element
var g = document.createElement("progress");
// Set the value of progress element
g.setAttribute("value", "57");
// Set the maximum value of progress element
g.setAttribute("max", "100");
// Get the value of progress element
document.getElementById("GFG").appendChild(g);
}
</
script
>
</
body
>
</
html
>