the backend (controller of springmvc) returns data to the html page for comparison, and displays a tag
when satisfied.the backend (controller of springmvc) returns data to the html page for comparison, and displays a tag
when satisfied. does not use the framework, then you can only judge when rendering the html; the
framework is simple.
what you really want to solve is how to load the data? If it is preloaded, that is, the returned html page already contains data, there can be a variety of ways to hide (even the server side does not return the corresponding elements)
if it is dynamic loading, it needs to be hidden in the data returned by ajax processing.
vue use Vmurf, native if judgment
make judgment in the corresponding stage of rendering dom
jQuery
if(true) {
$('a').hide()
} else {
$('a').show()
}