标签:return child uil pre turn nbsp not 菜单栏 build
<div class="item">
<div class="title">服务器</div>
<div class="body"><a href=/ram.html>内存</a><a href=/host.html>主机</a></div>
</div>
for item in mn_list:
if item[‘url‘]:
html += tpl2.format(item[‘url‘],item[‘title‘])
else:
if not item[‘childrens‘]:
html +=tpl1.format(item[‘title‘],"")
else:
html +=tpl1.format(item[‘title‘], build_menu_tree(item[‘childrens‘]))
return html
标签:return child uil pre turn nbsp not 菜单栏 build
原文地址:http://www.cnblogs.com/tiantao36/p/7678436.html