01.
<select name=
"bo_select"
id=
"bo_select"
>
02.
<?
03.
$strSQL1
=
"SELECT count(*) as total , * FROM payment_long group by bo_id order by bo_id "
;
04.
$objQuery1
= mysql_query(
$strSQL1
);
05.
$CYE
=mysql_num_rows(
$objQuery1
);
06.
while
(
$objResult1
= mysql_fetch_array(
$objQuery1
))
07.
{
08.
$frequency
=
$objResult1
[
"total"
]+1;
09.
echo
"<option value=\"$frequency\">{$objResult1["
bo_id
"]}</option>\n"
;
10.
}
11.
?>
12.
</select>
14.
<script>
15.
$(
"select#bo_select"
).change(
function
(){
16.
var
selectedBO = $(this,
":selected"
).val();
17.
$(
"input#rent_amount"
).val(selectedBO);
18.
});
19.
</script>
20.
21.
<label>
22.
<input type=
"text"
name=
"rent_amount"
id=
"rent_amount"
style=
"background-color:#CCF"
/>
23.
</label>