我需要设置值" DO RESEARCH ON"
代码是这样的:
<div class="btn-group select bb-search-action-dropdown actionItem screen-block-z-index open">
<button class="btn dropdown-toggle clearfix btn-info" data-toggle="dropdown"><span class="filter-option pull-left">Do research on</span> <span class="caret"></span>
</button><span class="dropdown-arrow"></span>
<ul class="dropdown-menu custom-icn custom-icn-anim" role="menu" style="max-height: 118px; overflow-y: auto; min-height: 96px;">
<li rel="0" class=""><a tabindex="-1" href="#" class=""><span class="pull-left">I would like to</span></a>
</li>
<li rel="1" class="selected"><a tabindex="-1" href="#" class=""><span class="pull-left">Do research on</span></a>
</li>
<li rel="2"><a tabindex="-1" href="#" class=""><span class="pull-left"> Get a quote for</span></a>
</li>
<li rel="3"><a tabindex="-1" href="#" class=""><span class="pull-left">Check my eligibility for</span></a>
</li>
<li rel="4"><a tabindex="-1" href="#" class=""><span class="pull-left">Create an application</span></a>
</li>
<li rel="5"><a tabindex="-1" href="#" class=""><span class="pull-left">Talk to our help team</span></a>
</li>
</ul>
</div>
答案 0 :(得分:0)
这是HTML:
<div class="btn-group select bb-search-action-dropdown actionItem screen-block-z-index open">
<button id="drop" class="btn dropdown-toggle clearfix btn-info" data-toggle="dropdown"><span class="filter-option pull-left">Do research on</span> <span class="caret"></span>
</button><span class="dropdown-arrow"></span>
<ul class="dropdown-menu custom-icn custom-icn-anim" role="menu" style="max-height: 118px; overflow-y: auto; min-height: 96px;">
<li rel="0" class=""><a tabindex="-1" href="#" class=""><span class="pull-left">I would like to</span></a>
</li>
<li rel="1" class="selected"><a tabindex="-1" href="#" class=""><span class="pull-left">Do research on</span></a>
</li>
<li rel="2"><a tabindex="-1" href="#" class=""><span class="pull-left"> Get a quote for</span></a>
</li>
<li rel="3"><a tabindex="-1" href="#" class=""><span class="pull-left">Check my eligibility for</span></a>
</li>
<li rel="4"><a tabindex="-1" href="#" class=""><span class="pull-left">Create an application</span></a>
</li>
<li rel="5"><a tabindex="-1" href="#" class=""><span class="pull-left">Talk to our help team</span></a>
</li>
</ul>
</div>
这是jquery:
$("#drop").val("Do Research On");