dedecms 二级导航的实现代码

分享下dedecms导航代码,如下:

<ul id="topmenue">
<li class="first" id="mn_portal"><a href="/" hidefocus="true" title="Portal">网站首页<span>Portal</span></a></li>
{dede:channelartlist typeid={dede:field.typeid/}
<li id="mn_N5f30" onmouseover="t('{dede:field name='typeid'/}');" onmouseout="f('{dede:field name='typeid'/}');" name="{dede:field name='typeid'/}">
<a href="{dede:field name='typeurl'/}" [field:rel/] >{dede:field name='typename'/}</a>
<ul id="snav" name="{dede:field.typeid/}">
{dede:channel type='son' noself='yes'}
<li style="display:block;height:40px;margin:0;padding:0;clear:both;background:none;text-align:cnetent;line-height:40px;background:#F4FBF4;"><a href="[field:typelink /]" >[field:typename /]</a></li>
{/dede:channel}
</ul>
</li>
{/dede:channelartlist}
</ul>
<ul id="topmenue">
<li class="first" id="mn_portal"><a href="www.9pzy.com/" hidefocus="true" title="Portal">网站首页<span>Portal</span></a></li>
{dede:channelartlist typeid={dede:field.typeid/}
<li id="mn_N5f30" onmouseover="t('{dede:field name='typeid'/}');" onmouseout="f('{dede:field name='typeid'/}');" name="{dede:field name='typeid'/}">
<a href="{dede:field name='typeurl'/}" [field:rel/] >{dede:field name='typename'/}</a>
<ul id="snav" name="{dede:field.typeid/}">
{dede:channel type='son' noself='yes'}
<li style="display:block;height:40px;margin:0;padding:0;clear:both;background:none;text-align:cnetent;line-height:40px;background:#F4FBF4;"><a href="[field:typelink /]" >[field:typename /]</a></li>
{/dede:channel}
</ul>
</li>
{/dede:channelartlist}
</ul>

2,js代码

<script type="text/javascript">
function t(id) {
var dul = document.getElementsByName(id);
var fu = dul[1];
fu.style.display = "block";
}
function f(id) {
var dul = document.getElementsByName(id);
var fu = dul[0];
var lu = fu.childNodes[3];
lu.style.display = "none";
}
</script>
<script type="text/javascript">
function t(id) {
var dul = document.getElementsByName(id);
var fu = dul[1];
fu.style.display = "block";
}
function f(id) {
var dul = document.getElementsByName(id);
var fu = dul[0];
var lu = fu.childNodes[3];
lu.style.display = "none";
}
</script>

 

本站声明:本站所有素材资源均来自用户分享和网络收集,仅供用于学习和研究目的。不得使用于非法商业用途,不得违反国家法律;如有侵权、不妥之处,请联系站长以便删除。敬请谅解!

没有账号? 注册  忘记密码?