x.value
<h1>Emoticons  </h1>
  <input type="button" value=" : -) " onClick="x.value='Smiley'">
  <input type="button" value=" ; -) " onClick="x.value='Winky'">
  <input type="button" value=" : -( " onClick="x.value='Frowny'">
  <input type="button" value="=8-O " onClick="x.value='Omagosh!'">
  <input type="text" name=x  size=8><br><br>
      ...
* Notice …
the value of a text
   window is the contents
   of the window
   x.value