PHP代码:--------------------------------------------------------------------------------
<html>
<head>
<title>List</title>
<meta http-equiv="Content-Type" content="text/html; charset=??????">
<?
if( !( $link = mysql_connect() ) ){
fatal("Could not connect to local MySQL server.");
}
if( !mysql_select_db( "loaction", $link ) )
{
mysql_close( $link );
fatal("Could not select database <b>ParserSample</b>.");
}
$sql="select * from district order by locationid asc";
$query=mysql_query($sql,$link);
?>
<script language = "JavaScript">
var onecount;
onecount = 0;
subcat = new Array();
<?
$count=0;
while($rs=mysql_fetch_array($query)){
?>
subcat[<?=$count;?>] = new Array("<?=$rs['districtname'];?>","<?=$rs['locationid'];?>","<?=$rs['districtid'];?>","<?=$rs['areacode']?>","<?=$rs['zipcode']?>");
<?
$count++;
}
?>
onecount=<?=$count?>;
function GetCode(CityId){
var CityId=CityId;
var i;
for(i=0;i < onecount; i++){
if(subcat[i][2] == CityId){
d
| 对此文章发表了评论 |
