JSFiddle - React, Tailwind, and code Playground

HTML

<a class='smsContact' href='#SMS2?telefone=testeValue'>Click Me</a>

JavaScript

$('.smsContact').click(function() {
    xx = $(this).attr('href'); 
    alert('href is:  ' + xx);
    justval = xx.split('=');
    yy = justval[1];
    alert('Just the value is:  ' + yy);
});