I have a very simple form in HTML:
<form>
Number: <input id="form" type="text" name="Number"/>
</form>
Then I have this JavaScript:
var n = document.getElementById("form").value;
//calculations with n
//later, it outputs another variable (steps) that comes from that value of n
I want it to work out so that whenever the user types anything into the textbox, it does all of the JavaScript code and outputs the steps
without having any submit button or anything like that. So if the user is going to type 123, for example, when they type 1, it will output steps
when calculated for 1, then when they type the 2, it will output steps
when calculated for 12, then when the type the 3, it will output steps
when calculated for 123.