title: How to access the JSF's SelectItem from jQuery or JavaScript
body: <p>Is there a way to access to an id of <code>selectItem</code> JSF from JavaScript or jQuery?</p>
  
  <pre><code>&lt;a:commandButton id="ajaxButton" value="change" onclick="selectCheck()"&gt;
  &lt;/a:commandButton&gt;
  
  &lt;h:selectManyCheckbox id="check" &gt;
      &lt;f:selectItem id="myCheckbox" itemLabel="India" itemValue="India"  /&gt;
      &lt;f:selectItem itemLabel="China" itemValue="China" /&gt;
      &lt;f:selectItem itemLabel="Germany" itemValue="Germany" /&gt;
      &lt;f:selectItem itemLabel="USA" itemValue="USA" /&gt;
  &lt;/h:selectManyCheckbox&gt;
  </code></pre>
  
  <p>I try to access the id of the component but it returns null:</p>
  
  <pre><code>function selectCheck() {
      var obj = document.getElementById("myCheckbox");
      alert(obj);
      obj.checked=true;
  }
  </code></pre>
  
  <p>I want to check any of theses checkboxes dynamically by JavaScript or jQuery.</p>