Help the beginner!
Question: If we write the delay code of the alert as:
setTimeout("T1()", 500); function T1() { alert() } when loading alert pops up.
If you issue this action as a function FF () - the program does not work.
What's the matter?
The whole script is as follows.
<script> function FF() { setTimeout("T1()",500); function T1() { alert() } } </script> </head> <body> <body bgcolor="00ff00"> </body> </html>
bodyelements, and theFFfunction is not called anywhere, so the alert does not appear. And a plus: when a string is passed, its contents are executed in a global context, and since T1 is a local function by timeout, there will be an error since this function will not be found - Grundy