Here is relevant part of HTML code:
< a id=”interest” name=”interest” href=”#” value=1 onclick=”alert(this.value)”;”>Interested< /a>
the alert picks the value and shows when run in IE but shows undefined in Chrome and Firefox.
Any ideas why?
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.
A few things:
1) Extra spaces in your tags.
< a>should be<a>.2) Extra quote in your
onclickattribute. Should beonclick="alert(this.value);".3)
valueisn’t a valid attribute for an anchor element.