<html>  
    <head>  
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>  
    <title>表单元素</title>  
    </head>  
    <body>  
<?php 
if(isset($_GET['address']))
	$address=$_GET['address']; 
else
	$address="北京"; 
?>
<form name="formname" action="third.php" method="get">

<select name="address" id="select" onChange="javaScript:document.formname.submit()"> 
	<option value="北京"<?php if($address=="北京") echo "selected"?>>北京</option>  
    <option value="天津"<?php if($address=="天津") echo "selected"?>>天津</option>  
    <option value="南京"<?php if($address=="南京") echo "selected"?>>南京</option>  
</select><br>

</form> 
<?php echo $address;?>
</body>  
</html>