Write data from an input field to a progress tag - Javascript DOM HTML Element

Javascript examples for DOM HTML Element:Form Event

Description

Write data from an input field to a progress tag

Demo Code

ResultView the demo in separate window

<html>
   <head></head>
   <body> 
      <progress id="myProgress" value="75" max="100"> </progress> 
      <hr> 
      <input type="text" id="myTextarea"> 
      <button onclick="myFunction()">write to progress</button> 
      <hr> 
      <script>
function myFunction() {//from www.j av a 2 s  .c o  m
    var x = document.getElementById("myTextarea").value;
    document.getElementById("myProgress").value = x;
}

      </script>  
   </body>
</html>

Related Tutorials