title: Javascript Multiplication Table Based On User Input
body: <p>I have a program where the user enters two inputs, and then when the display button is pressed, the multiplication table within the parameters of those two numbers is displayed. However, when I press the button, nothing is displayed. </p>
  
  <pre><code>    &lt;span style = "font-size:15px"&gt;First Number: &lt;/span&gt;&lt;input type = "text" id = "first_num" style = "font-size:18px"&gt; &lt;br /&gt;&lt;br /&gt;
      &lt;span style = "font-size:15px"&gt;Second Number: &lt;/span&gt;&lt;input type = "text" id = "second_num" style = "font-size:18px"&gt; &lt;br /&gt;&lt;br /&gt;
      &lt;button type = "button" onclick = "display()"&gt;Display&lt;/button&gt; &lt;br /&gt;&lt;br /&gt;
      &lt;script type = "text/javascript"&gt;
      var f_num = document.getElementById("first_num").value;
      var s_num = document.getElementById("second_num").value;
      function display() {
      for (i=1;i&lt;f_num + 1;i++) {
              for (j=1;j&lt;s_num + 1;j++) {
              if (j == 10) {
              document.write(i+"*" +j +"=" +(i*j) + "&lt;br /&gt;&lt;br /&gt;")
              } else {
              document.write(i+"*" +j +"=" +(i*j) + "  |  ")
              }
              }
      } 
      }
      &lt;/script&gt;
  </code></pre>