title: How to use onClick() or onSelect() on option tag in a JSP page?
body: <p>How to use <code>onClick()</code> or <code>onSelect()</code> with <code>option</code> tag? Below is my code in which I tried to implement that, but it is not working as expected.</p>
  
  <p>Note: where <code>listCustomer</code> domain object list getting in JSP page.</p>
  
  <pre><code>&lt;td align="right"&gt; 
    &lt;select name="singleSelect" "&gt; 
       &lt;c:forEach var="Customer" items="${listCustomer}" &gt;
       &lt;option value="" onClick="javascript:onSelect(this);&gt; &lt;c:out value="${Customer}" /&gt;&lt;/option&gt;
                  &lt;/c:forEach&gt;
            &lt;/select&gt;         
          &lt;/td&gt;   
  </code></pre>
  
  <p>How do I modify it to detect that an option is selected?</p>