<small id='OE2l9'></small><noframes id='OE2l9'>

        <bdo id='OE2l9'></bdo><ul id='OE2l9'></ul>
    1. <legend id='OE2l9'><style id='OE2l9'><dir id='OE2l9'><q id='OE2l9'></q></dir></style></legend>
      <tfoot id='OE2l9'></tfoot>

    2. <i id='OE2l9'><tr id='OE2l9'><dt id='OE2l9'><q id='OE2l9'><span id='OE2l9'><b id='OE2l9'><form id='OE2l9'><ins id='OE2l9'></ins><ul id='OE2l9'></ul><sub id='OE2l9'></sub></form><legend id='OE2l9'></legend><bdo id='OE2l9'><pre id='OE2l9'><center id='OE2l9'></center></pre></bdo></b><th id='OE2l9'></th></span></q></dt></tr></i><div id='OE2l9'><tfoot id='OE2l9'></tfoot><dl id='OE2l9'><fieldset id='OE2l9'></fieldset></dl></div>
    3. 我如何找到最后一个&lt;li&gt;&lt;/li&gt;在每个 &lt;ul

      时间:2023-09-05

      <small id='37M7k'></small><noframes id='37M7k'>

          • <bdo id='37M7k'></bdo><ul id='37M7k'></ul>
          • <i id='37M7k'><tr id='37M7k'><dt id='37M7k'><q id='37M7k'><span id='37M7k'><b id='37M7k'><form id='37M7k'><ins id='37M7k'></ins><ul id='37M7k'></ul><sub id='37M7k'></sub></form><legend id='37M7k'></legend><bdo id='37M7k'><pre id='37M7k'><center id='37M7k'></center></pre></bdo></b><th id='37M7k'></th></span></q></dt></tr></i><div id='37M7k'><tfoot id='37M7k'></tfoot><dl id='37M7k'><fieldset id='37M7k'></fieldset></dl></div>
            <tfoot id='37M7k'></tfoot>
            <legend id='37M7k'><style id='37M7k'><dir id='37M7k'><q id='37M7k'></q></dir></style></legend>

                  <tbody id='37M7k'></tbody>

                本文介绍了我如何找到最后一个&lt;li&gt;&lt;/li&gt;在每个 &lt;ul&gt;&lt;/ul&gt;(前端,html,css,jquery)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我也有一个带有自己子菜单的菜单.

                I have a menu with their own submenus too.

                问题:当页面加载时,网站在每个子菜单的末尾发出一个字母 S.
                如何通过 JQuery 或 CSS删除每个子菜单末尾的 字母 S?

                Problem: When the page is loaded, the website emits a letter S at the end of every submenu.
                How can i remove that letter S at the end of every submenu via JQuery or CSS?

                这是我在 firebug 中复制 html 节点时的当前标记:

                This is the current markup when I copy html node in firebug:

                <nav class="shopMenuHover">
                    <div id="bx_incl_area_5_1"> 
                        <ul> 
                            <li class=""><a href="#" class="firstLevel"><font><font>Main Menu 1</font></font></a>
                            <div class="shopSubmenuHover" style=""><h2><a href="#"><font><font>Sub Menu 1</font></font></a></h2>
                                <ul> 
                                    <li>
                                        <a href=""><font><font>Sub Menu &gt; Sub Menu</font></font></a>
                                    </li>
                
                                    <li><a href="">Sub Menu &gt; Sub Menu</a> s</li>
                                </ul>
                            </div>
                        </li>
                
                
                        <li class="firstLevel hasSubmenu instrumentarium-en-fresen">
                        <a href="#" class="firstLevel"><font><font class="">Main Menu 2</font></font></a>
                
                        <div class="shopSubmenuHover" style=""><h2><a href=""><font><font class="">Sub Menu 2</font></font></a></h2>
                            <ul>
                                <li><a href=""><font><font>Sub Menu &gt; Sub Menu</font></font></a></li>
                                <li><a href="">Sub Menu &gt; Sub Menu</a> s</li>
                            </ul>
                
                        </div>
                        </li>
                
                            <li style="display:none " class="firstLevel hasSubmenu emptySubmenu outlet">
                                                        <a href="#" class="firstLevel">Outlet<</a>
                
                            </li>
                        </ul>
                    </div>
                </nav>
                

                这是我用来查找每个 ul 的最后一个 li 的 jquery

                This is the jquery that i used to find the last li of every ul

                <script type="text/javascript">
                  $(document).ready(function() {
                     $('.shopMenuHover ul li:last-child').css( "border", "1px solid" );
                  });
                </script>
                

                请帮帮我...

                推荐答案

                用这个

                <script type="text/javascript">
                
                  $(document).ready(function() {
                     $('.shopMenuHover ul li:last-child').contents(':not(a)').remove();
                  });
                
                </script>
                

                这篇关于我如何找到最后一个&lt;li&gt;&lt;/li&gt;在每个 &lt;ul&gt;&lt;/ul&gt;(前端,html,css,jquery)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                上一篇:具有删除功能的反应模式 下一篇:嵌套弹性盒子

                相关文章

                1. <small id='YF5C7'></small><noframes id='YF5C7'>

                  <i id='YF5C7'><tr id='YF5C7'><dt id='YF5C7'><q id='YF5C7'><span id='YF5C7'><b id='YF5C7'><form id='YF5C7'><ins id='YF5C7'></ins><ul id='YF5C7'></ul><sub id='YF5C7'></sub></form><legend id='YF5C7'></legend><bdo id='YF5C7'><pre id='YF5C7'><center id='YF5C7'></center></pre></bdo></b><th id='YF5C7'></th></span></q></dt></tr></i><div id='YF5C7'><tfoot id='YF5C7'></tfoot><dl id='YF5C7'><fieldset id='YF5C7'></fieldset></dl></div>
                2. <legend id='YF5C7'><style id='YF5C7'><dir id='YF5C7'><q id='YF5C7'></q></dir></style></legend>
                  • <bdo id='YF5C7'></bdo><ul id='YF5C7'></ul>
                  <tfoot id='YF5C7'></tfoot>