JS - Check if the input field equals the solution

前端 未结 3 651
孤街浪徒
孤街浪徒 2021-01-24 08:34

I\'m making a simple website for little kids with mathproblems,

the page contains a number of questions that the kids need to solve. They can press on 1 button that chec

3条回答
  •  旧时难觅i
    2021-01-24 08:49

    Took me a minute to realise you had simply not completed your quotes on the window alert "try again"

    function question1() {
      if (value == 32) {
         window.alert("Correct!");
       } else {
          window.alert("Try again")
       }
    }
    

提交回复
热议问题