How to make a Captcha "Enter the number from the picture"?
-
I searched the Internet, but there is only PHP. All I need is HTML / JS just for homework.JavaScript Anonymous, Mar 21, 2020 -
Well, a captcha that can stop bots can only be on the server.
For homework, it's probably okay to draw numbers in the canvas tagAnonymous -
- create and put pictures in a folder
- create an array with picture names
- generate a random number from 0 to the length of the array
- take the name of the picture from the array by the number equal to a random number.
- typeset the form with the corresponding image and its number in the data attribute
- when pressed, compare the number entered into the input with the value in the data attribute
- display the alert correctly / incorrectly
Anonymous - create and put pictures in a folder
2 Answers
Your Answer
To place the code, please use CodePen or similar tool. Thanks you!