Write the HTML and the JavaScript code that validates a numeric input. The number entered by the user should be between 1 and 10. When the user enters an invalid value, the background of the input will be red and the sentence “The number should be between 1 and 10” will be displayed in red just after the form. Notes: Copy and paste your script as your answer for this question. DON’T take screen shot for your HTML script. It must be editable script. Provide a screenshot of your output

CMPTR
3rd Edition
ISBN:9781337681872
Author:PINARD
Publisher:PINARD
Chapter15: Creating An Advanced Workbook
Section: Chapter Questions
Problem 3QY
icon
Related questions
Question

Write the HTML and the JavaScript code that validates a numeric input. The number entered by the user should be between 1 and 10.

When the user enters an invalid value, the background of the input will be red and the sentence “The number should be between 1 and 10” will be displayed in red just after the form.

Notes:

  1. Copy and paste your script as your answer for this question. DON’T take screen shot for your HTML script. It must be editable script.
  2. Provide a screenshot of your output
Number: 66
register
The number should be between 1 and 10
Transcribed Image Text:Number: 66 register The number should be between 1 and 10
Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer