I have a piece of jQuery code which I found on the internet and I want to integrate it to my jsp page, I use Spring form tags.
Here is the jQuery code:
jQuery, like any JavaScript, is added in a tag in the
tag of your JSP page. You either add all the code or just a link to the
.js
file containing your jQuery, like for example :
Having done that, you want now to leverage your jQuery in the HTML tags, you do that as for any HTML page. Namely, in your case, you don't have to take away the spring tags. Let it generate the select/options via your ${listOfInstitutionsNames}
, just add class="testclass"
to your spring form tag, like this :
When rendering the form on a browser, Spring will include in the generated HTML the class attribute with value of testclass.
Hope that helps, best of luck.