If you were using Internet Explorer 6 or 7 on a Windows machine or Opera 9, this demo would actually work!
Intro
Validation
Date and time types
Range control
Repetition
Calculated fields
Datalist
Autofocus
Prefilling forms
Roundtripping data
Input mode

Calculated fields

Output is a new type of form field, which is used for displaying calculated values.

* = 0

The third field should show the product of the multiplication.

This is how the code looks:
<form>
  <input name="a" type="number" step="any" value="0"> *
  <input name="b" type="number" step="any" value="0"> =
  <output name="result" onformchange="value = a.value * b.value">0
</form>

The onformchange event is a new event which is triggered on all elements in a form, when any of the input elements changes value. This is useful for tracking dependencies.

An output field does not support validation and is never submitted. Actually, the only thing that sets it apart from an ordinary non-form element, is that it recieves the onforminput and onformchange events, and it fires onchange when the value changes.

Page authors can also chain output-fields together, making more complex calculations. Here is one such chain:

(a) * (b)
a+b = 0 (c)
c * 2 = 0 (d)
d - a = 0