<script type="text/
javascript">
function getsel(){
var obj = document.getElementById("sel").value;
if(obj== ""){
obj = "0";
}
var newhref = "b.php?obj="+obj;
var ona = document.getElementById('ona');
ona.href = newhref;
}
</script>
<select id="sel">
<?php foreach ($sql_res as $value) { ?>
<option value="<?php echo $value[belongs];?>"><?php echo $value[belongs];?></option>
<?php };?>
</select>
<a id='ona' href="" target="_blank" onclick="getsel()">传值</a>