实现如上图的功能,主要考虑二点,第一:实现树,第二:实现复选效果
1,实现CSS效果
.ps{margin-left:10px;display:none;} .f { line-height: 20px; } .clear { clear: both; display: block !important; float: none !important; font-size: 0; height: 0 !important; line-height: 0; margin: 0 auto !important; overflow: hidden; padding: 0 !important; width: auto !important; }
2,页面内容展示
<div class="f" id="sgc1">
<input type="checkbox" id="chkAll" οnclick="selectAll()"/>
<span οnclick="w('gc1')" style="cursor:pointer;text-decoration:underline;color:#0026ff;">[全部]</span>
</div>
<div class="clear"></div>
<div class="ps" id="gc1" style="display:none;margin-bottom:10px;">
<hr style="borde