On 8 June 2011 14:31, ColinFine <[email protected]> wrote:
>
>
> On Jun 7, 8:05 am, 操坤 <[email protected]> wrote:
>> Hi:
>>         Sorry for my poor English  :P
>>         I know your meaning of your reply:
>>
>> I did a simple test:
>>
>>         test=function(){
>>                 alert("111111");
>>         }
>>         Event.observe(window,"load",test);
>>
> The above is correct.
>
>>         function test2(){
>>                 alert("22222");
>>         }
>>         Event.observe(window,"load",test2());
>
> The above is wrong.

I think

 Event.observe(window,"load",test2);

would be OK too.

-- 
Richard Quadling
Twitter : EE : Zend : PHPDoc
@RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY : bit.ly/lFnVea

-- 
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.

Reply via email to