RosettaCodeData/Task/Simple-windowed-application/Lambdatalk/simple-windowed-application.lambdatalk
2017-09-25 22:28:19 +02:00

13 lines
422 B
Text

1) the label: {div {@ id="label"} There have been no clicks yet }
2) the button: {input {@ type="button" value="click me" onclick="CLICKAPP.inc()" }}
3) the script: {script °° code °°} where code is a single function:
var CLICKAPP = (function() {
var counter = 0;
var inc = function() {
counter++;
getId('label').innerHTML =
'There are ' + counter + ' clicks now';
};
return {inc:inc}
})();