在javascript文件中我有这个:
Work.expenses= function (params)
{
function deleteExpenses()
{
//here I want to call the loadExpensesList method
}
}
Work.expensesList= function (params)
{
function loadExpensesList()
{
//this is the method I want to call
}
}
如何在deleteExpenses方法中调用loadExpensesList方法? 谢谢!
答案 0 :(得分:0)
Work.expenses= function (params)
{
function deleteExpenses()
{
Work.expensesList('something')();
}
}
Work.expensesList= function (params)
{
function loadExpensesList()
{
}
return loadExpensesList;
}
你可以这样试试。但通过了解要求可以更好。