在这里,我想计算<li>
标签的数量并显示计数的数字而不是 3。
<ul class="nav pull-right usernav">
<li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown"><span
class="icon16 icomoon-icon-bell"></span><span class="notification">3</span> </a>
<ul class="dropdown-menu">
<li class="menu">
<ul class="notif">
<li class="header"><strong>Notifications</strong> (3) items</li>
<li><a href="/Task_Status/get_Employee_Dialog"><span class="icon"><span class="btn_Employee_Dialog_Search select-div-icon"></span></span>
<span class="event">1 employee submited work</span> </a></li>
<li><a href="#"><span class="icon"><span class="icon16 icomoon-icon-user-2"></span></span>
<span class="event">1 User is registred</span> </a></li>
<li><a href="#"><span class="icon"><span class="icon16 icomoon-icon-comments-4"></span>
</span><span class="event">Jony add 1 comment</span> </a></li>
<li><a href="#"><span class="icon"><span class="icon16 icomoon-icon-new"></span></span>
<span class="event">admin Julia added post</span> </a></li>
<li class="view-all"><a href="#">View all notifications <span class="icon16 icomoon-icon-arrow-right-7"></span></a></li>
</ul>
</li>
</ul>
</li>
我怎样才能做到这一点?