Change 'onchange' of select
<p>I have a selectbox with an onchange:</p>

<pre><code>&lt;select id="select" onchange="eventA();"&gt;
</code></pre>

<p>I'd like to change the "onchange" to something else, for example to eventB();.</p>

<p>I've tried this, based on this post: <a href="https://stackoverflow.com/questions/1628826/how-to-add-an-onchange-event-to-a-select-box-via-javascript">How to add an onchange event to a select box via javascript?</a></p>

<pre><code>document.getElementById("select").onchange="eventB()";
</code></pre>

<p>However, nothing happens, the onchange does not change.</p>

<p>Any ideas?</p>