Javascript examples for DOM HTML Element:Form Event
Manually firing .onchange() event for input field by calling onchange() method
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript"> window.onload=( function() {/* w w w.j a v a 2 s . c om*/ document.getElementById("range").value='500'; document.getElementById("range").onchange(); }); </script> </head> <body> <input type="text" id="range" onchange="console.log(this.value)"> </body> </html>