|
-
-
-
-
- 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<m;i++) {
- var dict=driverCompanyList[i];
- HTML+='<li class="li_title" onclick="show_detail('+dict['res_id']+',\''+dict['res_name']+'\')">';
- HTML+='<span style="width:20%;">'+dict['res_name']+'</span>';
- var cur_href=window.location.href;
- cur_href=cur_href.replace('car_team_list.html','');
- HTML+='<span style="width:60%;margin-left:20px">'+cur_href+'car_team.html?res_id='+dict['res_id']+'&res_name='+dict['res_name']+'</span>';
- HTML+='</li>';
- }
- 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);
- }
|