RosettaCodeData/Task/GUI-component-interaction/Lambdatalk/gui-component-interaction.l...

9 lines
427 B
Plaintext

{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);"}}