Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
使用 code.org,我需要能够让用户点击一个按钮,将他们带到另一个屏幕,而无需经常使用 OnEvent(s),有人可以帮我吗?纽布在这里。感谢您的时间。
您可以使用按钮和字符串的值创建一个函数,并在其中放置一个回调
function event(button,input_type, screen) { onEvent(button, input_type, function() { setScreen(screen); }); }