What is the meanign of javascript:; that is kept inside the href attribute in an link?
Like
<a href="javascript: ... ;">Link</a>
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
IF you need to pass a javascript snippet which needs to run instead of the default behavior of an element then you use this
javascript: ;syntax.For example
Similarly, you can combine these on other events also, like
onclick,onchangeetc but this is really not necessary, since you can execute the snippet, directly.The uses of this, i have seen in years are:
<a href="javascript:void(0);">Test</a><form action="javascript:void(0);">..</form>