I have a sample application which has something like below.
<a href="javascript:{}" id="anchorlnk">Go</a>
which javascript function does the link call?
I have a sample application which has something like below.
<a href="javascript:{}" id="anchorlnk">Go</a>
which javascript function does the link call?
It does nothing, the {}
on the link creates a new empty object that is unused, is not a function call...
Maybe your events are binded on the page load, and someone put this just to do nothing. You could use simply href="#"
People use different techniques to do nothing :) More examples are:
href="javascript:;"
href="javascript://"
href="javascript:void();"
If you use
href="#"
then you probably will have an onclick event handler, make sure you return false at the end of your "onclick code", otherwise the page will be scrolled to the top which can be very unpleasent to the user.