注意把 sort_config('cms',0) 换成对应的频道目录名与栏目ID ~~~ <div id="showsort"> {volist name=":sort_config('cms',0)" id="name"} <button data-id="{$key}" class="{:get_sort($key,'logo','','cms')}">{$name}</button> <ul name="cc{$key}"></ul> {/volist} </div> <!--这里是不需要显示的,仅只是为了获取对应的模板内容--> <div style="display:none"> {qb:tag name="sort_cms_content" type="cms" rows="10" where="status>0" union="fid"} <div><a href="{$rs.url}">{$rs.title}</a></div> {/qb:tag} </div> <script type="text/javascript"> $(document).ready(function () { var url = "{qb:url name='sort_cms_content' /}"; $("#showsort button").each(function(){ var fid = $(this).data("id"); $.get(url+"?fid="+fid,function(res){ if(res.code==0){ $("#showsort ul[name='cc"+fid+"']").html(res.data); } }); }); }); </script> ~~~