Double-selection radio buttons in JavaScript.
Version of Tuesday 10 November 2015.
Dave Barber's other pages.

This is a sample implementation of double-selection radio buttons in JavaScript. With ordinary radio buttons, exactly one option is in the selected state at any time. By contrast, with double-selection buttons exactly two options are in the selected state at any time.

The two selected buttons are designated older and newer:

The extension to triple-selection buttons, although not presented here, is straighforward.

123456789 older
newer

All source code is in this one HTML file, which anyone may copy, modify and redistribute as desired.