2012-09-12 51 views
1

我有很多功能。我正在使用一個asp.net控件。 我想調用一個(主)函數中的所有函數。這是一個返回類型函數。 這必須使用Javascript。如何使用javascript在一個函數中調用多個函數?

function a(){ 
    if(b==c){ 
    return true 
}else{ 
    return false; 
} 

function b(){ 
    if(b==c){ 
     return true; 
}else{ 
    return false; 
} 

function c(){}//return type 

函數a,b和c在main函數中調用函數。

function main() 
    { 
    //?? 
    } 

此功能不是工作。

+0

那麼問題是什麼? – sachleen

+1

調用'main'函數。 '' – adatapost

回答

2

要麼你想:

function main() 
{ 
    return a() && b() && c() && d(); // all must be true to return true 
} 

function main() 
{ 
    return a() || b() || c() || d(); // at least 1 must be true to return true 
} 
相關問題