How do you make an anchor link non-clickable or disabled?

后端 未结 18 2099
清酒与你
清酒与你 2020-11-27 02:38

I have an anchor link that I want to disable once the user clicks on it. Or, remove the anchor tag from around the text, but definitely keep the text.



        
18条回答
  •  眼角桃花
    2020-11-27 03:15

    Create following class in style sheet :

      .ThisLink{
               pointer-events: none;
               cursor: default;
        }
    

    Add this class to you link dynamically as follow.

     some text
    
        //   or using jquery
    
    

提交回复
热议问题