How does the front end display the a tag when a condition is met, otherwise hide it

the backend (controller of springmvc) returns data to the html page for comparison, and displays a tag

when satisfied.
If

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()
}
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b36122-2bfc8.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b36122-2bfc8.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?