window.onload=function(){ var url="./st-xm/Api/car_team_controll.php?method=getDriverCompanyList"; console.log(url); $.getJSON(url,function(res_data){ console.log(res_data); if(res_data['code']!="0"){alert(res_data['info']);return;} var driverCompanyList=res_data['driverCompanyList']; var HTML=''; for (var i=0,m=driverCompanyList.length;i'; HTML+=''+dict['res_name']+''; var cur_href=window.location.href; cur_href=cur_href.replace('car_team_list.html',''); HTML+=''+cur_href+'car_team.html?res_id='+dict['res_id']+'&res_name='+dict['res_name']+''; HTML+=''; } if(HTML){ $('#all_ul').html(HTML); }else{ $('#all_ul').html(''); } }) } function show_detail(res_id,res_name){ var url="car_team.html?res_id="+res_id+"&res_name="+res_name; window.open(url); }