Best way to create an link with empty href [duplicate]

You can use javascript:void(0)

<a id="ServerSort" href="https://stackoverflow.com/questions/22940761/javascript:void(0)">

you don’t need style="text-decoration:underline" as commented by King King


by jQuery you can do it by event.preventDefault()

Stop the default action of the event .

$('#ServerSort').click(function(event){
   event.preventDefault(); //or return false;
});

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)