title: Javascript Calculator from beginner
body: <p>I am trying to learn Javascript and I am practicing creating a calculator. I followed a short tutorial on youtube and I've run into some problems. First, all the values to do stay when I use the "+" button. Also, nothing in calculating. Can someone with a lot more knowledge than I see what might possibly be wrong with my code? </p>
  
  <pre><code>&lt;body&gt;
  
  &lt;form name="frm"&gt;
  
  
  &lt;input name="result"&gt;
  &lt;br&gt;
  &lt;input name="1" type="button" value="1" onClick="run1()"&gt;
  &lt;input name="2" type="button" value="2" onClick="run2()"&gt;
  &lt;input name="3" type="button" value="3" onClick="run3()"&gt;
  &lt;br&gt;
  &lt;input name="4" type="button" value="4" onClick="run4()"&gt;
  &lt;input name="5" type="button" value="5" onClick="run5()"&gt;
  &lt;input name="6" type="button" value="6" onClick="run6()"&gt;
  &lt;br&gt;
  &lt;input name="7" type="button" value="7" onClick="run7()"&gt;
  &lt;input name="8" type="button" value="8" onClick="run8()"&gt;
  &lt;input name="9" type="button" value="9" onClick="run9()"&gt;
  
  &lt;input type="button" name="plus" value="+" onClick="runplus()"&gt;
  
  &lt;input type="button" name="calc" value="=" onClick="evalu()"&gt;
  &lt;/form&gt;
  
  
  &lt;script type="text/javascript"&gt;
  
  function run1 (){
  document.frm.result.value += "1";
  }
  
  function run2 (){
  document.frm.result.value += "2";
  }
  
  function run3 (){
  document.frm.result.value += "3";
  }
  
  function run4 (){
  document.frm.result.value += "4";
  }
  
  function run5 (){
  document.frm.result.value += "5";
  }
  
  function run6 (){
  document.frm.result.value += "6";
  }
  
  function run7 (){
  document.frm.result.value += "7";
  }
  
  function run8 (){
  document.frm.result.value += "8";
  }
  
  function run9 (){
  document.frm.result.value += "9";
  }
  
  function runplus (){
  document.frm.result.value = "+";
  }
  
  function evalu (){
  
  var evalo = eval(document.frm.result.value)
  
  document.frm.result.value = evalo;
  }
  
  
  
  &lt;/script&gt;
  
  &lt;/body&gt;
  </code></pre>
  
  <p>Here is a <a href="http://jsfiddle.net/55Jam/" rel="nofollow">jsfiddle</a>.</p>