我的 JS 代码为:
$(function () { //line-1
if(window.location.search.length >1){
//doSomething ;
areFieldsSet(); //call this function
} //end of if
var areFieldsSet = function(){
//do something
}
//do many things
} // end of line-1 function
现在,当我尝试引用问题标题中描述的 areFieldsSet 函数时出现错误。我哪里错了?