Difference between href="#" and href="javascript:void(0)"

href="" will link to the same page as the one you are currently on, effectively refreshing the page. href="#" will not refresh the page, but using the # will make the screen move to the top of the page (it is the browser effectively looking for an anchor with no name, ). javascript:void(0) will prevent anything happening on the link at all.

Comments

Popular posts from this blog

SQL Server 2008 MERGE statement

I Built an AI Reviewer That Refuses to Tell Me If My Idea Will Work