{input {@ id="input" type="text" value="0"}} {input {@ type="button" value="increment" onclick="document.getElementById('input').value = parseInt( document.getElementById('input').value ) + 1;"}} {input {@ type="button" value="random" onclick="if (confirm( 'yes?' )) document.getElementById('input').value = Math.round(Math.random()*100);"}}