Is there a particular reason programmers prefer not to use onClick function in Javascript?
Is there a particular reason programmers prefer not to use onClick function in Javascript?
Share
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.
Your question is unclear. What criticism are you referring to? The only thing that springs to mind is the move towards unobtrusive Javascript. The idea is simply to keep your markup as simple as possible and to put all your code in one place. So instead of:
you have:
with something like jQuery:
This is much more maintainable and easier to read.