Joke Collection Website - Public benefit messages - How to get the value of verification code with js?

How to get the value of verification code with js?

The verification code is generated in our background code, which is java code. And then displayed on the page. After the user enters the verification code, check whether the verification code entered by the user is the same as the verification code generated in the background. When comparing, you can compare through ajax, and resolutely oppose using hidden fields to save the verification code generated in the background, because it is easy to be attacked.