Web*_*ner 60 javascript function
我只是想知道如何在另一个函数内调用javascript函数.所以,如果我有下面的代码,我如何调用第一个函数?
function function_one()
{
alert("The function called 'function_one' has been called.")
//Here I would like to call function_two.
}
function function_two()
{
alert("The function called 'function_two' has been called.")
}
Run Code Online (Sandbox Code Playgroud)
Chr*_*ian 95
function function_one() {
function_two(); // considering the next alert, I figured you wanted to call function_two first
alert("The function called 'function_one' has been called.");
}
function function_two() {
alert("The function called 'function_two' has been called.");
}
function_one();
Run Code Online (Sandbox Code Playgroud)
小智 22
function function_one() {
function_two();
}
function function_two() {
//enter code here
}
Run Code Online (Sandbox Code Playgroud)
function function_one()
{
alert("The function called 'function_one' has been called.")
//Here u would like to call function_two.
function_two();
}
function function_two()
{
alert("The function called 'function_two' has been called.")
}
Run Code Online (Sandbox Code Playgroud)