Click here to Skip to main content
15,896,500 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
What is the difference between calling a JavaScript function directly like onclick = "a()" and onclick="JavaScript:a()" where a() is a function written in JavaScript?
Posted

1 solution

JavaScript
onclick = "a()"

This is done while writing in designer form page like *.ASPX or *.ASCX, i.e. while writing in client side.
Similar approach can be used for defining click via script language like in Javascript or so.


onclick="JavaScript:a()"

This is done while writing in code-behind files. They reside on server and needs to know that the execution of method a() is client side and defined in scripts.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900