【发布时间】:2019-04-25 00:25:41
【问题描述】:
enter image description here我想更改以下代码以选择选项并执行这些功能
<div class="dropdown">
<button class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown" id="button1">Date Range
<span class="caret" id="car"></span><i class="fa fa-calendar"></i> </select>
<ul class="dropdown-menu">
<li><input type="checkbox" class="chb" name="checkfield" id="checkboxes" onchange="today(this)">Today</li>
<li><input type="checkbox" class="chb" name="checkfield" id="checkboxes" onchange="lastweek(this)">Last 7 Days</li>
<li><input type="checkbox" class="chb" name="checkfield" id="checkboxes" onchange="last30days(this)">Last 30 Days</li>
<li><input type="checkbox" class="chb" name="checkfield" id="checkboxes" onchange="presentmonth(this)">This Month</li>
<li><input type="checkbox" class="chb" name="checkfield" id="checkboxes" onchange="lastmonth(this)">Last Month</li>
<li><input type="checkbox" class="chb" name="checkfield" id="checkboxes" onchange="yesterday(this)">Yesterday</li>
<li><input type="checkbox" class="chb" name="checkfield" id="checkboxes" onchange="today(this)">Custom Range</li>
</ul>
</div>
Change the second image to the first, the code is for the second image
【问题讨论】:
-
您显示的代码已经有一个选择字段和一个复选框列表 - 所以不清楚您在这里真正想要什么。请努力正确解释您拥有什么、您需要什么以及您遇到的具体问题。
-
如果我点击一个选项,它应该会显示
-
我的意思是,超链接复选框和标签,当我选择时,它应该显示,我认为它不应该是一个按钮??
标签: javascript html css