Input through buttons

http://stackoverflow.com/questions/38564320/inputting-into-a-text-box-via-buttons/38564750#38564750

by Flying Gambit

HTML

<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.6/angular.min.js"></script>
<table>
     <tr>
      <td>
      <input type="button" value="Q" onclick="inputChar(this)"/>
      <input type="button" value="W" onclick="inputChar(this)"/>
      <input type="button" value="E" onclick="inputChar(this)"/>
      <input type="button" value="R" onclick="inputChar(this)"/>
      <input type="button" value="T" onclick="inputChar(this)"/>
      <input type="button" value="Y" onclick="inputChar(this)"/>
      <br/>
      <input id="myTextBox" type="text" />
      </td>
      </tr>
</table>

JavaScript

inputChar= function(clickedBtn){
  var myTextBox = document.getElementById("myTextBox");
  myTextBox.value += clickedBtn.value;
}