我想知道如何在不刷新页面的情况下选择复选框中的值
<div class="da-form-row">
<label>Filter</label>
<div class="da-form-item">
<ul class="da-form-list inline">
<span class="formNote">
<?= $_LANG[211]; ?>
</span>
<li>
<input class="uniform" type="checkbox" name="individual" id="individual" value="0" />
<label>
<?= $_LANG[11]; ?>
</label>
</li>
<li>
<input class="uniform" type="checkbox" name="individual" id="individual" value="1" />
<label>
<?= $_LANG[12]; ?>
</label>
</li>
<li>
<input class="uniform" type="checkbox" name="individual" id="individual" value="2" />
<label>
<?= $_LANG[13]; ?>
</label>
</li>
<li>
<input class="uniform" type="checkbox" name="individual" id="individual" value="3" />
<label>
<?= $_LANG[14]; ?>
</label>
</li>
</ul>
</div>
</div>
<div class="da-form-row">
<label>
<?= $_LANG[134];?>
<span class="required">*</span></label>
<div class="da-form-item large"> <span class="formNote">
<?= $_LANG[135];?>
</span>
<select class="chzn-select required" name="ano_letivo">
<?
$type = $_GET['filter'];
$q
->select()
->from('user')
->where_equal_to(
array(
'cargo'=>$type
)
)
->run();
if($q){
$unit=$q->get_selected();
foreach($unit as $array){
print "<option value='".$array['id']."'>".$array['nome']."</option>";
}
}
?>
</select>
</div>
</div>
我不想刷新页面。通过ajax我是怎么做到的?
请记住,如果选择了 4 个过滤器,则有 4 个复选框。
->where_equal_to(
array(
'cargo'=>$type,
'cargo'=>$type2,
'cargo'=>$type3
)
)