How to splice the href of a tag

<a href="http://..../index.php/index/index/pay.html?it=" + $("-sharppaymoney").text()>

above is an error code. I want to pass the value of label of id= "paymoney" as a parameter.
how to write it correctly

May.26,2022

<a id="a-link" href="http://..../index.php/index/index/pay.html?it=">
<script>
var href = $('-sharpa-link').attr('href');
$('-sharpa-link').attr('href',href + $("-sharppaymoney").text());
</script>
Menu