1、TP5.1編輯頁面所屬分類(項(xiàng)目)下拉列表顯示當(dāng)前分類
(1)edit.html編輯頁面
<option value="{$sort.id}"
{if $office.sort == $sort.id}
selected="selected"
{/if}
>{$sort.title}</option>
(2)用jq來完成
<script type="text/javascript">
$(function(){
$("select").find("option[value='{$office.sort}']").attr('selected', 'selected');
})
</script>