title: javascript select input event
body: <p>I'm trying to create a select input from javascript and bind a function to when a user changes an option. So far I have:</p>
  
  <pre><code>filter.change = function() {
      console.log("CHANGED");
  }
  </code></pre>
  
  <p>But nothing happens on selecting something else. What is wrong with this code. Also, how can I get the new selected value in the function ? Something like:</p>
  
  <pre><code>console.log(this.value + "has been selected")
  </code></pre>