Javascript examples for DOM HTML Element:Progress
You can create a <progress> element by using the document.createElement() method:
<!DOCTYPE html> <html> <body> <button onclick="myFunction()">create a PROGRESS element with a maximum value of "100" and a current value of "42"</button> <script> function myFunction() {//from w ww . ja va 2 s .c om var x = document.createElement("PROGRESS"); x.setAttribute("value", "42"); x.setAttribute("max", "100"); document.body.appendChild(x); } </script> </body> </html>