javascript - Is it possible to run a function that is '2-deep' within another function? -
I need to execute a function from a But since I did not run the 'code' window.onload event within this 'overall' function May be on the 'top layer' I tried to do this, but it was not working, but basically I think that this is what I want to do. I can not just run the function 1 from the How to do any suggestions I can solve it ?? You should study and learn different JavaScript methods, which will code you in your candidate manner. There is a great resource and will show you the things you should know. Each pattern gives details of implementation, benefits and disadvantages. Here is an example that uses the module pattern: window.onload event. I want to lie within the function's function. I know that I can run the function
function1 () {function2 ()) from another function; } Function2 () {... a process ...}
& lt; Script & gt; Function () {function1 () {.. some stuff ..} function2 () {function1 (); }} Window.onload = function2; & Lt; / Script & gt;
window.onload event because this object is bound by the onclick event.
// global module var myModule = (function () {function privateMethod1 () {...} Function privateMethod2 () {. ..} return {publicMethod: function () {privateMethod1 ();}}}}) (); MyModule.publicMethod ();
Comments
Post a Comment