• You would do it like this. I am not a super proficient javascript guy so this code may need a little tweaking. Don't forget to rate my answer. <script type="text/javascript"> function domath(x) { var y=document.getElementById(x).value; document.getElementById(x).value = y + 2; } </script> </head> <body> Enter your number: <input type="text" id="number" onchange="domath(">

Copyright 2020, Wired Ivy, LLC

Answerbag | Terms of Service | Privacy Policy