Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org
#

Q1003 How can I multiply two form field values and show the result in a third?

You are here: irt.org | FAQ | JavaScript | Form | 6 | Q1003 [ previous next ]

Use something like:

<FORM>
<INPUT TYPE="TEXT" NAME="number1"> x
<INPUT TYPE="TEXT" NAME="number2">
<INPUT TYPE="BUTTON" VALUE="=" onClick="this.form.answer.value = (this.form.number1.value - 0) * (this.form.number2.value - 0)">
<INPUT TYPE="TEXT" NAME="answer">
</FORM>

Feedback on 'Q1003 How can I multiply two form field values and show the result in a third?'

©2018 Martin Webb