title: Javascript onClick event in all cells
body: <p>I'm learning JavaScript and I've not that much experience.
  But I'm making a HTML table and I want to add in every table cell (<code>&lt;td&gt;</code>) a onClick event.</p>
  
  <pre><code>&lt;table id="1"&gt;
      &lt;tr&gt;
          &lt;td onClick="tes()"&gt;1&lt;/td&gt;&lt;td onClick="tes()"&gt;2&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td onClick="tes()"&gt;3&lt;/td&gt;&lt;td onClick="tes()"&gt;4&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>Is there another way to do this event in every cell?</p>