function firstFunction()
{
stringWord = "Hello World";
function secondFunction()//How to call this function in thirdfunction() ??
{
alert(stringWord);
}
}
function thirdFunction()
{
run = setTimeout( ... , 5000);
}
嗨,我为此放弃。有人帮我或者有另一种方式调用该函数吗?
最佳答案
尝试这个:
function firstFunction()
{
stringWord = "Hello World";
this.secondFunction = function()//How to call this function in thirdfunction() ??
{
alert(stringWord);
}
}
var instand = new firstFunction();
function thirdFunction(){
run = setTimeout( 'instand.secondFunction()', 5000);
}
希望对您有所帮助。