Results 1 to 2 of 2
Jun 30, 2008, 08:07 #1
- Join Date
- Dec 2007
- 0 Post(s)
- 0 Thread(s)
syntax question re calling function in an object
It seems that when the funtion is a method inside of an object you leave out the parenthesis - quoting from page 108 of the book I see:
link.onclick = wikipediaLink.clickHandler;
link.onclick = wikipediaLink.clickHandler();
Am I correct and can anyone explain why?
Many thanks for any clarification.