This is my HTML page
<script>
function set()
{
document.getElementById("txt").value++;
}
</script>
<input id="txt" type="text" onchange="javascript:alert('txt changed');" value="0">
<br/>
<input type="button" onclick="set()" value="Set Data"/>
When I press the button, the text box value is changing, and the onchange event is not firing, but when I enter value manually in the textbox, it is firing the onchange.
All I want is to call a JavaScript function when data is changed in the textbox when a button is clicked.
Can you help?