0
For example:
function principal()
{ function one_level_1(){...}
one_level_1();
function two_level_1(){...}
two_level_1();
function three_level_1()
{ function one_level_2(){...}
one_level_2();
}
three_level_1();
}
<input type="text" onfocus="one_level_2();"/>
I would like that at the event onfocus
that input
call the job one_level_2
so that only the instructions internal to it were executed.
What is the correct way to call this function?
I tried to <input type="text" onfocus="(principal().three_level_1().one_level_2();)"/>
, but without success.
This example you gave is not very clear to me. Why do you auto-execute the function right after you declare it? these functions use/change variables of the most external scope?
– Guilherme Lautert