Menu
Hiya,
I am just getting started with JavaScript and am writing a rudimentary calculator as an exercise. Here is my question: how do I change the value of a text field? For instance, this is an example of what I have tried:
[code=html]
…
// whatever is type in the text field, change the value to the input string.
function change (input) {
// here is where I have a problem
document.text1.value = input;
}
…
<body>
<input type = “text” name = “text1” onChange = “change(“boink”)”>
</body>
</html>