首页 \ 问答 \ 如何在不影响我的span标记的情况下删除li标签的值(How to remove the value of my li tag without affecting my span tag)

如何在不影响我的span标记的情况下删除li标签的值(How to remove the value of my li tag without affecting my span tag)

我想删除我的li标签(配置文件,事件,照片,通知)中的值,而不会影响span标签,一旦我点击菜单..请...在这需要一些帮助..谢谢!

<nav class="nav navi-tag">
            <ul class="font">
                <a><li data-button = "btn-navbar" id = "btn1"><span class = "glyphicon glyphicon-list"></span>Profile</li></a>
                <a><li data-button = "btn-navbar" id = "btn2"><span class = "glyphicon glyphicon-user"></span>Events</li></a>
                <a><li data-button = "btn-navbar" id = "btn3"><span class = "glyphicon glyphicon-picture"></span>Photos</li></a>
                <a><li data-button = "btn-navbar" id = "btn4"><span class = "glyphicon glyphicon-envelope"></span>Notification</li></a>
            </ul>
            <div class = "font handle">Menu</div>
        </nav>

我的JS

 $('.handle').click(function() {
          $nav.each(function() {
          ss = $(this).text();
          xx = $('nav ul a li').html().replace(ss, "");
          alert(xx);
          });

I want to remove the value inside of my li tag(Profile, Event, Photos, Notification) without affecting the span tag once i click the menu .. pls.. need some helping hand here.. Thank You!!

<nav class="nav navi-tag">
            <ul class="font">
                <a><li data-button = "btn-navbar" id = "btn1"><span class = "glyphicon glyphicon-list"></span>Profile</li></a>
                <a><li data-button = "btn-navbar" id = "btn2"><span class = "glyphicon glyphicon-user"></span>Events</li></a>
                <a><li data-button = "btn-navbar" id = "btn3"><span class = "glyphicon glyphicon-picture"></span>Photos</li></a>
                <a><li data-button = "btn-navbar" id = "btn4"><span class = "glyphicon glyphicon-envelope"></span>Notification</li></a>
            </ul>
            <div class = "font handle">Menu</div>
        </nav>

my JS

 $('.handle').click(function() {
          $nav.each(function() {
          ss = $(this).text();
          xx = $('nav ul a li').html().replace(ss, "");
          alert(xx);
          });

原文:https://stackoverflow.com/questions/36386855
更新时间:2022-02-15 21:02

最满意答案

如果您使用的是模式版本1.6,Solr将自动从存储的docValues中获取值,即使字段本身设置为stored="false" 。 在fl包含字段名称以获取值。

但是,即使您正在查找为文档/字段/值索引的实际令牌,使用“分析”页面通常也是首选方法,因为它允许您调整值并快速查看响应。 如果要浏览实际的索引标记, Luke请求处理程序/工具非常有用。


If you're using schema version 1.6, Solr will automagically fetch the values from the stored docValues, even if the field itself is set as stored="false". Include the field name in fl to get the values.

However, even if you're looking for the actual tokens indexed for a document / field / value, using the Analysis page is usually the preferred way as it allows you to tweak the value and see the response quickly. The Luke Request Handler / Tool is useful if you want to explore the actual indexed tokens.

相关问答

更多