我在操作脚本项目时遇到问题。我必须向用户询问 5 次问题,用户必须回答,当用户单击按钮时,必须验证答案。
有没有办法让 for 循环等待点击事件?
我在想的是这样的:
for(teller = 0; teller < 5; teller++){
//show new question
//user answers , and when finished the user clicks the button
buttonNext.addEventListener(MouseEvent.CLICK,checkAnswer);
//it has to wait until the user clicks the button , and then begin all over again
}