Html Calculator input trigger result : I have a very simple html calculator. I want when i type into the input for example `2+2` and press enter key to get result in the same field.


    <div id="calculator">
       <div id='calc-contain'>
          <form name="calculator">
             <input  id='result' type="text" name="answer" />
             <br>
             <input type="button" value=" 1 " onclick="calculator.answer.value += '1'" />
             <input type="button" value=" 2 " onclick="calculator.answer.value += '2'" />
             <input type="button" value=" 3 " onclick="calculator.answer.value += '3'" />
             <br/>
             <input type="button" value=" 4 " onclick="calculator.answer.value += '4'" />
             <input type="button" value=" 5 " onclick="calculator.answer.value += '5'" />
             <input type="button" value=" 6 " onclick="calculator.answer.value += '6'" />
             </br>
             <input type="button" value=" 7 " onclick="calculator.answer.value += '7'" />
             <input type="button" value=" 8 " onclick="calculator.answer.value += '8'" />
             <input type="button" value=" 9 " onclick="calculator.answer.value += '9'" />
             </br>
             <input type="button" value=" x " onclick="calculator.answer.value += '*'" />
             <input type="button" value=" c " onclick="calculator.answer.value = ''" />
             <input type="button" value=" 0 " onclick="calculator.answer.value += '0'" />
             <input type="button" value=" / " onclick="calculator.answer.value += '/'" />		
             <input type="button" value=" + " onclick="calculator.answer.value += '+'" />
             <input type="button" value=" - " onclick="calculator.answer.value += '-'" />
             </br>
             <input style='width:97%;' type="button" value=" = " onclick="calculator.answer.value = eval(calculator.answer.value)" />
          </form>
       </div>
    </div>