i need to get id when i have another tag a : i have my code is 



    <a class="btn btn-outline-primary" id="1"  href="<?php echo site_url(); ?>/InchatroomController/LikeMessage/1" style=""> </a>
    <a class="btn btn-outline-primary" id="2"  href="<?php echo site_url(); ?>/InchatroomController/LikeMessage/2" style=""> </a>
    <a class="btn btn-outline-primary" id="3"  href="<?php echo site_url(); ?>/InchatroomController/LikeMessage/3" style=""> </a>
    <a class="btn btn-outline-primary" id="4"  href="<?php echo site_url(); ?>/InchatroomController/LikeMessage/4" style=""> </a>

and id = n 

i need to know how to write jquery ajax go to InchatroomController/LikeMessage/id" don't refresh page or
how can i get id tag a when i click
