{"id":70,"date":"2016-06-03T08:48:25","date_gmt":"2016-06-03T00:48:25","guid":{"rendered":"http:\/\/www.tra56.com\/?p=70"},"modified":"2016-06-03T08:48:25","modified_gmt":"2016-06-03T00:48:25","slug":"using-the-phpjqueryajax-vehicle-model-four-level-linkage-drop-down-menu","status":"publish","type":"post","link":"https:\/\/www.tra56.com\/70.html","title":{"rendered":"\u5229\u7528php+jQuery+ajax\u5b9e\u73b0\u6c7d\u8f66\u8f66\u578b\u56db\u7ea7\u8054\u52a8\u4e0b\u62c9\u83dc\u5355"},"content":{"rendered":"

\n\t\u4eca\u5929\u518d\u5411\u5927\u5bb6\u5c55\u793a\u4e00\u4e2aphp\u3001jQuery\u3001ajax\u7684\u5b9e\u4f8b\u3002\u5475\u5475~~\u672c\u8eab\u8fd9\u4e2a\u5b9e\u4f8b\u6ca1\u6709\u591a\u5c11\u6280\u672f\u542b\u91cf\uff0c\u54c8\u54c8~~\u6709\u6280\u672f\u542b\u91cf\u7684\u662f\u8fd9\u4e2a\u8f66\u578b\u5e93\u7684\u6570\u636e~~\u563f\u563f~~\u60f3\u5f53\u521d\u4e5f\u91c7\u96c6\u4e86\u597d\u957f\u65f6\u95f4\u624d\u641e\u5b9a\u7684\u5462~\n<\/p>\n

\n\t
\n\u8fd9\u6b21\u8fd9\u4e2a\u6c7d\u8f66\u8f66\u578b\u56db\u7ea7\u8054\u52a8\u4e0b\u62c9\u83dc\u5355\u7684\u5e94\u7528\u4e2d\u5c31\u6709\u5173\u4e8e\u5224\u65ad\u8bf7\u6c42\u6765\u6e90\u7684\u5e94\u7528\u3002\u5728DEMO\u4e2d\u4f1a\u6709\u8bf4\u660e\u3002
\n<\/span>
\n\u9996\u5148\u6765\u5c55\u793a\u4e00\u4e0b\u6548\u679c\u56fe\uff1a\n<\/p>\n

\n\t\"\u5229\u7528php+jQuery+ajax\u5b9e\u73b0\u6c7d\u8f66\u8f66\u578b\u56db\u7ea7\u8054\u52a8\u9009\u62e9\"<\/a><\/p>\n

\n\t\t\u5229\u7528php+jQuery+ajax\u5b9e\u73b0\u6c7d\u8f66\u8f66\u578b\u56db\u7ea7\u8054\u52a8\u9009\u62e9\n\t<\/p>\n<\/div>\n

\n\t\n<\/div>\n

\n\t\u4e0b\u9762\u6211\u5c31\u76f4\u63a5\u8d34\u51fa\u4ee3\u7801\u4e86\uff1a\u4e0d\u6562\u5174\u8da3\u7684\u5c31\u76f4\u63a5\u7565\u8fc7\u5427^_^
\n\u9996\u5148\u770bHTML\u4ee3\u7801\uff1a<\/strong>\n<\/p>\n

\n
\n
\n\t\t\t?<\/a><\/span>\n\t\t<\/div>\n
\n\n
\n
\n
\n\t\t\t\t\t\t\t1\n\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t2\n\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t3\n\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t4\n\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t5\n\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t6\n\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t7\n\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t8\n\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t9\n\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t10\n\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t11\n\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t12\n\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t13\n\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t14\n\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t15\n\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t16\n\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t17\n\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t18\n\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t19\n\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t20\n\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t21\n\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t22\n\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t23\n\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t24\n\t\t\t\t\t\t<\/div>\n<\/td>\n
\n
\n
\n\t\t\t\t\t\t\t\t<labelfor=\"level_one\">\u8f66\u8f86\u7c7b\u578b: <\/label>\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t<selectid=\"level_one\"name=\"level_one_id\"onchange=\"car_type_search(this,'level_two','level_three','level_four','2')\">\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t    <optionvalue=\"\">\u9009\u62e9\u8f66\u8f86\u7c7b\u578b<\/option>\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t    <optionvalue=\"1\">\u8f7f\u8f66<\/option>\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t    <optionvalue=\"2\">\u5546\u52a1\u8f66\/MPV<\/option>\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t    <optionvalue=\"3\">\u8d8a\u91ce\u8f66\/SUV<\/option>\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t    <optionvalue=\"4\">\u9762\u5305\u8f66<\/option>\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t    <optionvalue=\"5\">\u8dd1\u8f66<\/option>\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t    <optionvalue=\"6\">\u76ae\u5361<\/option>\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t    <optionvalue=\"7\">\u5ba2\u8f66<\/option>\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t    <optionvalue=\"8\">\u8d27\u8f66<\/option>\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t<\/select>\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t<labelfor=\"level_two\">\u8f66\u578b\u54c1\u724c: <\/label>\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t<selectid=\"level_two\"name=\"level_two_id\"onchange=\"car_type_search(this,'level_three','level_four','','3')\">\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t    <optionvalue=\"\">\u9009\u62e9\u8f66\u578b\u54c1\u724c<\/option>\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t<\/select>\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t<labelfor=\"level_three\">\u54c1\u724c\u8f66\u7cfb:<\/label>\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t<selectid=\"level_three\"name=\"level_three_id\"onchange=\"car_type_search(this,'level_four','','','4')\">\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t    <optionvalue=\"\">\u9009\u62e9\u8f66\u7cfb<\/option>\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t<\/select>\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t<labelfor=\"level_three\">\u5177\u4f53\u8f66\u578b:<\/label>\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t<selectid=\"level_four\"name=\"level_four_id\">\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t    <optionvalue=\"\">\u9009\u62e9\u8f66\u578b<\/option>\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t<\/select>\n\t\t\t\t\t\t\t<\/div>\n<\/p><\/div>\n<\/td>\n<\/tr>\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\t\t\t24\n\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t25\n\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t26\n\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t27\n\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t28\n\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t29\n\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t30\n\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t31\n\t\t\t\t\t\t<\/div>\n<\/td>\n
\n
\n
\n\t\t\t\t\t\t\t\tfunctioncar_type_search(select_obj,first_dom_id,second_dom_id,third_dom_id,level){\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t    var$base_select = $(select_obj);\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t    varposition = $base_select.offset();\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t    var$select1 = $(\"#\"+first_dom_id);\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t    $select1.find(\"option:not(:first)\").remove();\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t    if(second_dom_id !=\"\"){\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t        var$select2 = $(\"#\"+second_dom_id);\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t        $select2.find(\"option:not(:first)\").remove();\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t    }\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t    if(third_dom_id !=\"\"){\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t        var$select3 = $(\"#\"+third_dom_id);\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t        $select3.find(\"option:not(:first)\").remove();\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t    }\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t    if($base_select.val() !=\"\"){\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t        var$tip=$('#ajax_image');\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t        $tip.css(\"display\",\"\");\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t        $tip.css(\"top\",position.top).css(\"left\",position.left);\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t        $.getJSON(base_url +\"car_setup\/car_type_search.html?id=\"+ $base_select.val() +\"&level=\"+ level,function(data){\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t            varoption_html =\"\";\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t            $.each(data,function(entryIndex,entry){\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t                if(level == 2){\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t                    option_html +=\"<option value=\"\"+entry.id+\"\">\"+entry.first_letter +\" \"+ entry.name+\"<\/option>\";\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t                }elseif(level == 3 || level == 4){\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t                    option_html +=\"<option value=\"\"+entry.id+\"\">\"+entry.name+\"<\/option>\";\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t                }\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t            });\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t            $select1.append(option_html);\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t            $tip.css(\"display\",\"none\");\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t        });\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t    }\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t<\/div>\n<\/p><\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table><\/div>\n<\/div>\n

\n\tPHP\u4ee3\u7801\uff1a(\u6ce8\u610f\uff1a\u6211\u7528\u7684\u662fCI\u6846\u67b6\uff0c\u5728\u6570\u636e\u5e93\u8c03\u7528\u8fd9\u5757\u662f\u5b9e\u7528\u4e86CI\u7684mysql\u7c7b\u5e93)<\/strong>\n<\/p>\n

\n
\n
\n\t\t\t?<\/a><\/span>\n\t\t<\/div>\n
\n\n
\n
\n
\n\t\t\t\t\t\t\t1\n\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t2\n\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t3\n\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t4\n\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t5\n\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t6\n\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t7\n\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t8\n\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t9\n\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t10\n\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t11\n\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t12\n\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t13\n\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t14\n\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t15\n\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t16\n\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t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t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t44\n\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t45\n\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t46\n\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t47\n\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t48\n\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t49\n\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t50\n\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t51\n\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t52\n\t\t\t\t\t\t<\/div>\n<\/td>\n
\n
\n
\n\t\t\t\t\t\t\t\tif(isset($_SERVER['HTTP_X_REQUESTED_WITH']) && isset($_SERVER['HTTP_REFERER']) &&$_SERVER['HTTP_REFERER'] == site_url(\"car_setup\")){\/\/\u5224\u65ad\u8bf7\u6c42\u5730\u5740\u4ee5\u53ca\u5224\u65ad\u662f\u5426\u4e3aajax\u63d0\u4ea4\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t    $id=$this->input->get('id');\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t    $level=$this->input->get('level');\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t    if($level== 2){\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t        $array=array();\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t        $array[] =array('id'=>'','name'=>'\u56fd\u4ea7','first_letter'=>'');\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t        $level_two_guochan_list=$this->db->from(\"car_setup\")->where(\"father_id\",$id)->where(\"country\",0)->order_by(\"first_letter ASC,name ASC\")->get();\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t        $level_two_jinkou_list=$this->db->from(\"car_setup\")->where(\"father_id\",$id)->where(\"country\",1)->order_by(\"first_letter ASC,name ASC\")->get();\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t        if($level_two_guochan_list->num_rows() > 0){\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t            foreach($level_two_guochan_list->result()as$level_two_obj){\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t                $array[] =array(\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t                    'id'           =>$level_two_obj->id,\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t                    'name'         =>$level_two_obj->name,\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t                    'first_letter' =>$level_two_obj->first_letter\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t                );\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t            }\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t            $level_two_guochan_list->free_result();\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t        }\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t        $array[] =array('id'=>'','name'=>'\u8fdb\u53e3','first_letter'=>'');\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t        if($level_two_jinkou_list->num_rows() > 0){\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t            foreach($level_two_jinkou_list->result()as$level_two_obj){\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t                $array[] =array(\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t                    'id'           =>$level_two_obj->id,\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t                    'name'         =>$level_two_obj->name,\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t                    'first_letter' =>$level_two_obj->first_letter,\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t                    'sort_order'   =>$level_two_obj->sort_order\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t                );\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t            }\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t            $level_two_jinkou_list->free_result();\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t        }\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t        echojson_encode($array);\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t        exit;\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t    }elseif($level== 3 ||$level== 4){\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t        $array=array();\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t        $level_three_list=$this->db->from(\"car_setup\")->where(\"father_id\",$id)->order_by(\"sort_order ASC\")->get();\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t        if($level_three_list->num_rows() > 0){\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t            foreach($level_three_list->result()as$level_two_obj){\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t                $array[] =array(\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t                    'id'           =>$level_two_obj->id,\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t                    'name'         =>$level_two_obj->name,\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t                    'first_letter' =>$level_two_obj->first_letter,\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t                    'sort_order'   =>$level_two_obj->sort_order\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t                );\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t            }\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t            $level_three_list->free_result();\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t        }\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t        echojson_encode($array);\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t        exit;\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t    }\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t    echo\"\u54c8\u54c8~\u975eajax\u8bf7\u6c42\u90fd\u88ab\u62d2\u7edd\uff01\";\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t<\/div>\n<\/p><\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table><\/div>\n<\/div>\n

\n\t\u6700\u540e\u9644\u4e0a\u8868car_setup\u7684\u6570\u636e\u7ed3\u6784\n<\/p>\n

\n
\n
\n\t\t\t?<\/a><\/span>\n\t\t<\/div>\n
\n\n
\n
\n
\n\t\t\t\t\t\t\t1\n\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t2\n\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t3\n\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t4\n\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t5\n\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t6\n\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t7\n\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t8\n\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t9\n\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t10\n\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t11\n\t\t\t\t\t\t<\/div>\n<\/td>\n
\n
\n
\n\t\t\t\t\t\t\t\tCREATETABLE`ci_car_setup` (\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t  `id`int(11)NOTNULLauto_increment,\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t  `name`varchar(80)NOTNULL,\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t  `father_id`int(11)NOTNULL,\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t  `level`int(2)NOTNULL,\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t  `country` tinyint(1)default'0',\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t  `first_letter`char(1)defaultNULL,\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t  `sort_order`int(11)NOTNULLdefault'0',\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t  PRIMARYKEY (`id`),\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t  KEY`father_id` (`father_id`)\n\t\t\t\t\t\t\t<\/div>\n
\n\t\t\t\t\t\t\t\t) ENGINE=MyISAM AUTO_INCREMENT=68470DEFAULTCHARSET=utf8\n\t\t\t\t\t\t\t<\/div>\n<\/p><\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table><\/div>\n<\/div>\n

\n\t\u5475\u5475~\u73b0\u5728\u7684\u8868\u91cc\u670968470\u6761\u6570\u636e\u5462~~<\/p>\n","protected":false},"excerpt":{"rendered":"

\u4eca\u5929\u518d\u5411\u5927\u5bb6\u5c55\u793a\u4e00\u4e2aphp\u3001jQuery\u3001ajax\u7684\u5b9e\u4f8b\u3002\u5475\u5475~~\u672c\u8eab\u8fd9\u4e2a\u5b9e\u4f8b\u6ca1\u6709\u591a\u5c11\u6280\u672f\u542b\u91cf\uff0c\u54c8\u54c8~~\u6709\u6280\u672f […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-70","post","type-post","status-publish","format-standard","hentry","category-html"],"_links":{"self":[{"href":"https:\/\/www.tra56.com\/wp-json\/wp\/v2\/posts\/70"}],"collection":[{"href":"https:\/\/www.tra56.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tra56.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tra56.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tra56.com\/wp-json\/wp\/v2\/comments?post=70"}],"version-history":[{"count":1,"href":"https:\/\/www.tra56.com\/wp-json\/wp\/v2\/posts\/70\/revisions"}],"predecessor-version":[{"id":71,"href":"https:\/\/www.tra56.com\/wp-json\/wp\/v2\/posts\/70\/revisions\/71"}],"wp:attachment":[{"href":"https:\/\/www.tra56.com\/wp-json\/wp\/v2\/media?parent=70"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tra56.com\/wp-json\/wp\/v2\/categories?post=70"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tra56.com\/wp-json\/wp\/v2\/tags?post=70"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}