Recently, I used jQuery to write the left and right movement of the option value of the drop-down box. The code is as follows:
It can be used when browsing with this file, but it cannot be used when placed in jsp. The stupid way to solve it is to write an alert method to see what error is reported, and I found the problem:
The $ in front of jQuery’s function conflicts with the $ in JSTL of the JSP page, which directly leads to the inability to recognize the object method.
Solution: Change all $ in the jQuery code to jQuery and it will work normally!