More useful fields and buttons
With this first script, you type answer in the field, and, when you click on the button the small box gets a 1 or 0 depending on whether the answer is correct.
You can copy the script that generates this question, and then, using a text editor's substitute command, replace the zzz in the source code with 1, 2, 34, or 5 or 6 etc. Thus you can have the number of the questions and the names of the variables in synch . Then for the next question simply do the whole process over again. Remember that you need to use the FORM and /FORM commands only
once
; Use FORM (with the angle brackets) before your javascripts and /FORM after the last one. as you can see I've done by viewing the source code. Notice too that there is no need to use any functions. You can use a similar procedure for the other scripts below.
zzz. Your Question (Answer is
your answer
)
With this second script, you type answer in the field, and, when you click on the button the small box gets a 1 or 0 depending on whether the answer is correct, plus there is an alert that tells you if you are right or wrong and what the correct answer is. jjj is what can be substituted.
jjj. Your Question (Answer is
your answer
)
This third script does the same as the first script, except there are two possible answers. qqq is the substitution.
qqq. Your Question (Answer is
your answer
or
your second answer
)
This fourth script is the same as the second script, except that it allows for two answers. yyy is the substiution.
yyy. Your Question (Answer is
your answer
or
your second answer
)