‘onClick’ Event for Buttons
<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>
      ...
* Event handlers say what
   to do if event happens …
   “put ‘Smiley’ in the output
   window”
Event handlers = mini programs