Javascript examples for DOM Event:onchange
Change content on Onchange event, handle onchange event in Javascript
<html> <head></head> <body> <form name="forms1"> Enter Price: /* ww w. j av a 2s.c o m*/ <input type="text" id="price1" onchange="fun()"> Value is: <span id="price"></span> </form> <script> function fun() { var x=document.getElementById("price1").value; document.getElementById('price').innerHTML=x*2; } </script> </body> </html>