Is
<a href="javascript:;">..</a>
and <a href="#"> .. </a>
do same work.
I saw the first one lot of times and generally i use the second one. Can some one differentiate these two?
Is
<a href="javascript:;">..</a>
and <a href="#"> .. </a>
do same work.
I saw the first one lot of times and generally i use the second one. Can some one differentiate these two?
No, they are two different things:
<a href="javascript:;">..</a>
is javascript that does nothing.
<a href="#"> .. </a>
is an anchor tag that takes the user to the top of the page.
Syntactically they both work, semantically they are both wrong (assuming your intended purpose is not to link the user to the top of the page). Semantically, an anchor tag shouldn't be used if you aren't linking to something.
Further discussion on this topic can be found here: What does href expression <a href="javascript:;"></a> do?