ANSWERS: 1
-
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(this.id)">
Copyright 2023, Wired Ivy, LLC