Home >Backend Development >PHP Tutorial >ajax-ecshop手机端省市联动bug

ajax-ecshop手机端省市联动bug

WBOY
WBOYOriginal
2016-06-02 11:28:491255browse

ajaxphp手机

/*AJAX获取区域信息*/
if($act == 'ajax_get_region')
{
$region_id = intval($_GET['region_id']);
$type = intval($_GET['type']);
$region = get_regions($type, $region_id);
//print_r($region);
$html = $onclick = '';
switch ($type){
case '1': $onclick = 'province'; break;
case '2': $onclick = 'city'; break;
case '3': $onclick = 'area'; break;
}
if($region){
foreach ($region as $v){
$html.="{$v['region_name']}";
}
}
echo $html;
exit;

}

第二次点击修改地址是,就出现这样的bug,求大神怎么破

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn