Activate onchange after changing content with javascript
<p>Why wouldn't onChange function of an input be activated when the value of the input is changed by javascript? For example why when clicking on the button alert wouldn't happen?</p>

<pre><code>&lt;html&gt;
&lt;body&gt;
&lt;input type="text" id="myInput" onchange="alert(1)" /&gt;
&lt;button onclick = "document.getElementById('myInput').value = 'ads'"&gt;click&lt;/button&gt;
&lt;/body&gt;    
&lt;/html&gt;
</code></pre>

<p>How can I make the onchange function work then?</p>

<p>edit:
I now understand event won't be triggered automatically, how can I call it(jquery too) ?</p>
