A spin edit control

Properties

Methods

id = name of the object - required for onclick eventsspinup = onclick event handler for up button
div = id of the DIV tag in which the control will be placedspindn = onclick event handler for down button
readonly = if true text entry will not be allowedspinchange = onchange event handler for text if not readonly
min = minimum valuecreate = redraw the control
max = maximum valueshow = show properties - if speditdiv exists then creates editable table else alert
step = incrementnormalize = makes sure values are consistent, then refreshes spin edit and show
STEP = big increment (if non-zero - fast buttons will display)
value = current value
width = text width in pixels
height = text font size in pixels

Change any of the property values below,
then tab out of the text box to see the change.
Simply click on the readonly value to change it.


Download Spin.zip - contains CSS, JS & HTML