How to use Code org creating simple program without using a bunch of OnEvents

时间:2017-04-10 03:12:30

标签: code.org

using code.org i need to be able to have a user click on a button that takes them to another screen without using OnEvent(s) constantly, can anyone help me out? Newb here. Thank you for your time.

1 个答案:

答案 0 :(得分:0)

您可以创建一个具有按钮和字符串值的函数,并在其中放置回调

function event(button,input_type, screen) {
    onEvent(button, input_type, function() {
        setScreen(screen);
    });
}