for(let i=1; i<4; i++){
       if(i === obj){
           $('#info'+i).css('display', '');
           //$('#basic'+i).addClass('active');
       }else{
           $('#info'+i).css('display', 'none');
           //$('#basic'+i).removeClass('active');
       }
   }

假设为三个按钮,其中几个页面的id 写成info+num(num为 1,2,3),多个页面以此类推

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-12-19
  • 2021-09-10
  • 2021-05-22
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-10-11
  • 2022-12-23
  • 2022-12-23
  • 2022-01-10
相关资源
相似解决方案