![]() | |
![]() |
| | Thread Tools | Display Modes |
#11
| |||
| |||
|
|
Do you mean that switching between quotation marks and apostrophes makes that difference? No, it does not matter whether you use single or double quotes. The difference is the function makeSameStuff, which returns function that is used as second argument of butt1.on and butt2.on. |
#12
| |||
| |||
|
|
Thomas 'PointedEars' Lahn escribió: The Reference has zero relevance to this question. To pass parameters to an event handler, the handler must be wrapped into another function" document.form1.button1.onclick = function() { setBGColor('some value'); }; http://developer.mozilla.org/en/docs...event_handlers This section should be removed as it advocates an obsolete practice and has nothing to do with the ("Core") programming language. Event handlers/listeners are part of the (Gecko) DOM API. So the syntax to assign a callback function with parameters is... :-? |
![]() |
| Thread Tools | |
| Display Modes | |
| |