Easy way of subtracting in javascript to make change
<p>I am using this code for my form</p>

<pre><code>Total: &lt;input name="total" id="total" type="text" readonly="readonly" style="background-color:#eee;" value="&lt;? echo $total; ?&gt;" /&gt;&lt;br /&gt;&lt;br /&gt;
Cash: &lt;input name="cash" id="cash" type="text" /&gt;&lt;br /&gt;&lt;br /&gt;
Change: &lt;input name="change" id="change" type="text" readonly="readonly" style="background-color:#FF0;"/&gt;
</code></pre>

<p>The total comes from php e.g 25.00, i want to be able to put a number e.g 30.00 in cash and then the change says e.g. 5.00 and i want it to change on key up so if i change the amount it re-calculates, </p>

<p>Can anyone help with the JavaScript to make the calculation work,thanks</p>
