The Crazy Chimp The Crazy Chimp - 1 month ago 13
HTML Question

How to run multiple calculations using `oninput` (HTML5)?

I need a way of running a few calculations based on the contents of a single text box. I'm currently using a form, with the text box what accepts numeric values. I then use the

to calculate the other values eg.

<form oninput="x.value=7+y.value">

However I need a way of running multiple calculations using
. Is this possible? If so how? If not, what are my other options?


I solved this issue. You can do something like so:

<form oninput="x.value=7+y.value;z.value=y.value+300">