Java – how to implement dynamic GUI in JSP

I have a request. I need to display some fields on the JSP These fields are dynamic in nature, which means that for ex:, if I change some values in the drop-down list, some fields will be hidden and others may appear Instead of writing JavaScript for show / hide div, I want the logic encoded somewhere on the server side

I have an idea to implement a custom tag library, but if I can get an out of the box solution, I will know

Welcome any new suggestions or solutions

Solution

You'd better do it in JavaScript Having said that, you can send an Ajax request to get new form fields based on the input provided For example, there is a < div > setting HTML from the server

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>