test.html
<script type="text/javascript" src="js/jquery-1.7.2.js"></script>
<select name="first" id="first">
<option value="select">请选择</option>
<option value="1">test</option>
</select>
<select name="second" id="second">
</select>
<script type="text/javascript">
$('#first').change(function(){
url = "ajaxtest.php";
$.post(url,{current:$(this).val()}, function(msg) {
var tmp=eval(msg);
var str='';
for(var i=0;i<tmp.length;i++){
var c=tmp[i];
str+='<option value='+c+'>'+c+'</option>';
}
$('#second').html(str);
});
});
</script>
ajaxtest.php
<?php
$current=$_POST['current'];
$data = array('1','2','3'); //数据库操作
echo json_encode($data);