按商品类型显示:<select onchange="location.href='__ACTION__/type_id/'+this.value;">
<option value="">选择类型</option>
<?php foreach ($typeData as $k => $v):
if($v['id'] == $typeId)
$select = 'selected="selected"';
else
$select = '';
?>
<option {$select} value="{$v.id}">{$v.cat_name}</option>
<?php endforeach; ?>
</select>
![](https://img2024.cnblogs.com/blog/35695/202408/35695-20240826070647288-243310440.jpg)