Accessibility Compliance
SurveyJS libraries meet a variety of WCAG and Section 508 standards. Run AXE® Validation to assess this demo’s accessibility level.

Quiz with Instant Results

Edit in →

Online quizzes are a great way to engage your students and test their knowledge on a particular topic. With SurveyJS, you can create multiple online assessment forms, add timing and scoring, customize their appearance, and give personalized feedback to each student once they have completed a test or right after they answered a question. This demo shows how to create an assessment test that displays instant results. Learners can see whether their answer is correct or incorrect immediately after they give it.

Create a Regular Quiz

For your assessment test, you can leverage all available questions types: single- or multiple-choice questions, true/false questions, fill-in-the-blanks questions, and many more. Specify the correctAnswer property for each question. For detailed instructions on how to make a quiz in JavaScript, refer to the following help topic: Create a Quiz.

Display Results Immediately

To display the response result, check whether a question was answered correctly by calling a question's isAnswerCorrect() method and show the check result. Handle the survey's onValueChanged event to perform these actions immediately after a question value is set. In this demo, "Correct" and "Incorrect" labels indicate correct and incorrect answers. These labels are added to question titles (see the changeTitle function).

You should also disallow users to change their answer. Configure a question's enableIf expression to disable the question after it is answered.

Optionally, you can handle the survey's onTextMarkdown event to format the correct/incorrect label text with HTML and CSS.

Your cookie settings

We use cookies to make your browsing experience more convenient and personal. Some cookies are essential, while others help us analyse traffic. Your personal data and cookies may be used for ad personalization. By clicking “Accept All”, you consent to the use of all cookies as described in our Terms of Use and Privacy Statement. You can manage your preferences in “Cookie settings.”

Your renewal subscription expires soon.

Since the license is perpetual, you will still have permanent access to the product versions released within the first 12 month of the original purchase date.

If you wish to continue receiving technical support from our Help Desk specialists and maintain access to the latest product updates, make sure to renew your subscription by clicking the "Renew" button below.

Your renewal subscription has expired.

Since the license is perpetual, you will still have permanent access to the product versions released within the first 12 month of the original purchase date.

If you wish to continue receiving technical support from our Help Desk specialists and maintain access to the latest product updates, make sure to renew your subscription by clicking the "Renew" button below.