Could you tell me how to add the red underline when clicking the mouse?

http://wap.8288888.cn/2018424/ wants to achieve such an effect

solve

Mar.05,2021

  tabArr:['',''],
  active:0,

 click(index){
     this.active = index
       },
   active

Code
document


the easiest way is to get the tag to click in js, and add the css attribute 'text-decoration: underline', underline color to the color attribute after triggering the click event.
refer to CSS text-decoration attribute

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-1bf713e-32043.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-1bf713e-32043.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?