|
|
|
|
|
|
|
|
|
|
|
|
When
programming the action for
|
|
|
event
handlers, always ask, “What
|
|
|
do I
want to happen on this event?”
|
|
|
* |
In this case, get the value out of the x1
|
|
|
window, add 2 to it and put the result
|
|
|
into the x2 window for display.
|
|
|
|
x2.value = x1.value + 2
|
|
|
|
or
|
|
|
|
onChange=" x2.value = x1.value + 2"
|
|