1
我創建了一個下拉列表,這是在單獨的頁面正常工作: jQuery.post輸出下拉列表
然而,當我在PP頁面使用jQuery.post()
將其輸出到一個表,內容運行出從下拉列表中:
jQuery的,我現在用我們這樣的:
<script>
function showestate(){
$.post('admin/page/ur/showestate.php',{
zid: document.getElementById('zone').value
},
function(output){
$('#showestate').html(output);
});
}
showestate();
</script>
<div id='showestate'>
</div>
請幫助!謝謝!
下拉列表是這樣的:
<?php
include "../../db.php";
session_start();
?>
<select name="estate" id="estate" />
<?php
$sql_sel_estate = "select * from [estate]";
$result_sel_estate = mssql_query($sql_sel_estate, $conn);
while ($record_sel_estate = mssql_fetch_array($result_sel_estate))
{
$estateid = $record_sel_estate['estateid'];
$estatename = $record_sel_estate['estatename'];
$estatenameen = $record_sel_estate['estatenameen'];
$estatezoneid = $record_sel_estate['estatezoneid'];
$estatecode = $record_sel_estate['estatecode'];
?>
<option value="<?=$estateid?>">
<?=$estatenameen?><br>
</option>
<?php
}
?>
</select>
請提供有關此的更多信息,php代碼... –
請顯示響應是什麼。 – epascarello