简体   繁体   English

用Java语言更改按钮的文字

[英]Javascript to change the text of the button

I am a very new to Javascript. 我是Java的新手。 now I have a dropdown list within django. 现在我在Django中有一个下拉列表。 ---Select a status--- ---选择状态---

  • ALL 所有
  • Expired 已过期
  • Pending 待定
  • if I select give "ALL" as an example, it would navigate to "/all/" page, this is the correct behavior, but how can I change the text to "ALL" ? 如果我选择给出“ ALL”作为示例,它将导航到“ / all /”页面,这是正确的行为,但是如何将文本更改为“ ALL”?

    <div id="dropdown1" class="dropdown filter" >
        <a class="btn btn-default dropdown-toggle" type="button" id="dropdownMenu" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
            <span class="placeholder">---Select A Status---</span>
            <span class="caret"></span>
        </a>
        <ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu">
            <li><a class="active" href={{ view_all }}>All</a></li>
            <li><a class="" href={{ view_exipred }}>Expired</a></li>
            <li><a class="" href={{ view_pending }}>Pending</a></li>
            <li class="divider"></li>
        </ul>
    </div>
    

    Sorry for the incorrect edit.above are the code here. 很抱歉编辑不正确。以上是此处的代码。

    声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

     
    粤ICP备18138465号  © 2020-2024 STACKOOM.COM