日期:2014-05-17 浏览次数:20501 次
header("Content-Type: text/xml;charset=GBK");
$sheng=$_REQUEST['pro'];
$info="";
$query="select name from pre_common_district where upid=$sheng";
$result= mysql_query($query);
$info="<res>";
while($data= mysql_fetch_assoc($result)){
$info.="<city>".$data['name']."</city>";
}
$info.="</res>";
echo $info;
if(http_request){
var url="myajax.php?pro="+$('sheng').selectedIndex;
//var data="pro=";
//window.alert(data);
http_request.open("get",url,true);
//http_request.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
http_request.onreadystatechange=chuli;
http_request.send();
}
function chuli
************
var cities=http_request.responseXML.getElementsByTagName("city");