Linking value attribute to button click.We will keep one button and onClick event of the button will trigger a function. The function will increase the value of progress tag by 10.
Displaying Progress BarHTML5 gives us this tag and by using this we can create a progress bar.
<progress value="50" max="100" id=p1>50%</progress>This progress bar has two main attributes. One is value and other one is maximum attribute. We can read the present value of the progress bar and we can set them to a new value.
<input type=button value='Increse' onClick='incr();'>
var v1=document.getElementById('p1').value;Now we will set the new value by adding 10 to it.
document.getElementById("p1").value= v1 + 10;The total function code is here.