title: Checkboxes values not working
body: <p>I want to display "Hello" or "Shalom" when the corresponding checkbox is checked but i get undefined instead:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;script&gt;
      function clicking(cb) {
                 alert(cb.checked.value);
                 //alert(cb.checked) this works fine, it displays true or false
  }
  &lt;/script&gt;
  &lt;meta charset=utf-8 /&gt;
  &lt;title&gt;DOM0 Checkbox Click Event Example&lt;/title&gt;
  
  &lt;/head&gt;
  &lt;body&gt;
  
    &lt;label for="cb1"&gt;&lt;input id="cb1" type="checkbox" value = "Shalom" onclick="clicking(this);"&gt;Hello&lt;/label&gt;
   &lt;label for="cb2"&gt;&lt;input id="cb2" type="checkbox" value = "shalom" onclick="clicking(this);"&gt;Shalom&lt;/label&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Please help me but without using JS functions that have this template: <strong>getElementBys</strong>omething()</p>