title: How to convert a decimal number into percentage using Javascript
body: <p>I am trying to convert some decimal numbers present in the XML document into percentages using JavaScript but the code seems to be not working. Here is the html text :</p>
  
  <pre><code>fols is &lt;num&gt; .595498&lt;/num&gt;&lt;br/&gt;
  wif isa &lt;num&gt;.0656&lt;/num&gt;&lt;br/&gt;
  dewi is &lt;num&gt;.6949&lt;/num&gt;&lt;br/&gt;
  </code></pre>
  
  <p>Now here is the JavaScript I used :</p>
  
  <pre><code>function changeNumbers(){
      for(i=1; i&lt;= document.getElementByTagName("num").length; i++){
          if(1&lt;document.getElementByTagName("num").value&lt;0){
              UNum = document.getElementByTagName("num").value;
              UNum = Math.round(UNum*100) + '&amp;#37;';
              return UNum;
  
  
          }
      }
  };
  document.getElementByTagName("num").innerHTML = changeNumbers();
  </code></pre>
  
  <p><a href="http://jsfiddle.net/0gy7668o/8/" rel="nofollow">Demo Here</a></p>
  
  <p>Can someone please push me in the right direction with the above JavaScript code. Thanks in advance !!</p>