title: call javascript function onchange event of dropdown list
body: <p>I want to invoke javascript function when value in the dropdown list changes. <em>I dont want to hardcode dropdown list id</em> . </p>
  
  <p>Hence not using <code>document.getElementById</code></p>
  
  <p>My Code:</p>
  
  <pre><code>&lt;select id ="ddl" name="ddl" onmousedown="this.value='';" onchange="jsFunction(this.value);"&gt;
    &lt;option value='1'&gt;One&lt;/option&gt;
    &lt;option value='2'&gt;Two&lt;/option&gt;
    &lt;option value='3'&gt;Three&lt;/option&gt;
  &lt;/select&gt;
  
  function jsFunction(value)
  {
      alert(value);
  }
  </code></pre>
  
  <p>This is giving error <code>ReferenceError: jsFunction is not defined</code></p>
  
  <p>Fiddle : <a href="http://jsfiddle.net/6uyz4b8x/1/">http://jsfiddle.net/6uyz4b8x/1/</a></p>