Possible Duplicate:
What does “javascript:void(0)” mean?
In the below snippet what does javascript:void mean ? How can i make the user follow the link when he clicks the logout link provided href="javascript:void"?
<a href="javascript:void()" id="logout" onClick="#" ><strong>Logout</strong></a>
voidis a function that takes any input and returns nothing.It is commonly used in links to make them not go anywhere. Kind of like the links that have
href="#", but without affecting the browser history. There is almost always anonclickevent attached that tells the browser what to actually do. In the code you gave, the onclick attribute is not valid JavaScript…If you want the link to actually go somewhere, just use a regular
href.