我正在使用 mootoolsv1.3.2。使用 mootools 如何从以下代码中删除 Ul。我现在的代码:
<ul class="clean menu" id="topics">
<li class="drop png">
<a cat="ntech" class="sec_accnt" href="javascript:void(0);" name="&lid=choose_category_billing" rel="1" style="BACKGROUND-POSITION: 13px -164px">Billing</a>
</li>
<li class="drop png">
<div class="add">
<span href="#" id="tv" style="BACKGROUND-POSITION: 13px 9px">TV</span>
</div>
<ul class="clean menu sub">
<li>
<a cat="tech" class="sec_tv" href="javascript:void(0);" name="&lid=choose_category_tv_fios" rel="1">FiOS TV</a>
</li>
<li class="last" style="margin-bottom:6px;">
<a cat="tech" class="sec_tv_1" href="javascript:void(0);" name="&lid=choose_category_tv_direct" rel="1">DIRECTV</a>
</li>
</ul>
</li>
</ul>
应该是这样的:
<ul class="clean menu" id="topics">
<li class="drop png">
<a cat="ntech" class="sec_accnt" href="javascript:void(0);" name="&lid=choose_category_billing" rel="1" style="BACKGROUND-POSITION: 13px -164px">Billing</a>
</li>
<li class="drop png">
<a cat="ntech" class="sec_tv_fios" href="javascript:void(0);" name="&lid=choose_category_tv" rel="1" style="BACKGROUND-POSITION: 13px -164px">TV</a>
</li>
</ul>
更改应基于标志变量的值。
If flag=0{
code remains same
}else{
code changes as mentioned.
}
有人请帮助解决问题。