title: overwrite a variable through the select value
body: <p><i>
  I need to multiply a number with the values 1 till 64.
  I want to make this better by just selecting the number through a given selection, but somehow it only takes the first value of my selection. What is wrong here?
  </i></p>
  
  <pre><code>&lt;body&gt;
  &lt;h1&gt;some calculation&lt;/h1&gt;
  &lt;script type="text/javascript"&gt;
      function times(wert) {
          var j = document.getElementById('number').value;
          return Math.pow(j, wert);
      };
  &lt;/script&gt;
  &lt;select id="number" style="margin:40px;"&gt;
  &lt;option value="1"&gt;1=x&lt;/option&gt;
  &lt;option value="2"&gt;2=x&lt;/option&gt;
  &lt;option value="3"&gt;3=x&lt;/option&gt;
  &lt;option value="4"&gt;4=x&lt;/option&gt;
  &lt;/select&gt;
  &lt;table border="1mm"&gt;
    &lt;tbody&gt;&lt;tr&gt;&lt;th&gt;x&lt;/th&gt;&lt;th&gt;2*x&lt;/th&gt;
      &lt;script language="javascript"&gt;
          for (var i =0; i &lt;= 64; i++) {
          out = "&lt;tr&gt;&lt;td&gt;" + i + "&lt;/td&gt;&lt;td&gt;" + times(i)+ "&lt;/td&gt;&lt;/tr&gt;"
          document.write(out) ;
          } 
      &lt;/script&gt;
  &lt;/body&gt;
  </code></pre>