js 等待function执行完

var judage = function(){
  if($('#areaId').combotree('tree').tree('find','2')){
   initSettActivityList();
  }else{
   setTimeout(judage, 500); 
  }
 }
 judage();

你可能感兴趣的:(JavaScript,html,javascript,html)