Simple captcha without a backend.
Using just HTML and JS. It's vulnerable (obviously), but it gets things done for a simple project.
For a demo, you can watch the video I made here.
There are 3 files in the directory, namely, captcha.(css, html, js).
- Copy the CSS and JS files into your HTML directory (not necessary, but makes things simpler).
- Include these both into your HTML file. (If you're not sure how to do so, check captcha.html)
- Add an input field with ID as "randomfield" (this will be the Captcha displayer).
- Add an input field with ID as "CaptchaEnter" (this will be the field where user enters the captcha).
- Add a button or anything you desire, so that, onclick, the function
check()
is called (this function checks the input and redirects the user to a page if it matches). - To change the page to which redirection takes place, go to the JavaScript file
Now you have your own simple Captcha without any backend!
To get in contact, Email me at [email protected]!
Any bug fixes in the code are appreciated.