javascript函数调用 [英] javascript function calling
本文介绍了javascript函数调用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
function hello()
{
call();
alert("hello");
}
function call()
{
alert("call");
}
在上面的代码中,我只想让浏览器执行 alert(call )
不是警告(你好)
。
任何帮助
提前感谢
in the above code , i just want the browser to execute alert("call")
not alert("hello")
.
any help
thanks in advance
推荐答案
好吧,然后删除或注释掉alert(hello);
别忘了在已经宣布的地方调用这些功能(在下面)。
-SA
Well, then remove or comment outalert("hello");
don''t forget to call either of these functions at the point where there are already declared (that it, below).
—SA
function hello()
{
call();
if(致电())
{
alert(你好);
}
}
函数调用()
{
alert(call);
返回true ;
}
只有在电话()时才会调用警报(你好)将返回true
function hello()
{
call();
if(call())
{
alert("hello");
}
}
function call()
{
alert("call");
return true;
}
the alert("hello") will be called only when the call() will return true
这篇关于javascript函数调用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文