RosettaCodeData/Task/GUI-component-interaction/Lambdatalk/gui-component-interaction.lambdatalk
2023-07-01 13:44:08 -04:00

8 lines
427 B
Text

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