I'm doing a website and I encountered the following issue:
I want to show a list of months of different years (2017 and 2018), but the web browser only shows the months of one of the years in both options.
What am I doing wrong?
Here is the code:
<!--Botón que muestra el histórico de consumo (BOTÓN HISTÓRICO)-->
<div class="col-sm-2" style="float: right; top:100px;">
<div class="dropdown">
<button class="btn btn-primary btn-lg btn-block dropdown-toggle" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="material-icons" style="font-size: 22px; color:white;">list</i>
Histórico
</button>
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
<!--Botón 2018-->
<button class="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenuButton_2018" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
2018
</button>
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton_2018">
<button class="dropdown-item boton-enlace" type="button" onclick="recuperarBotonTiempoReal(); mostrarTablaHistorico();">Enero</button>
<button class="dropdown-item boton-enlace" type="button" onclick="recuperarBotonTiempoReal(); mostrarTablaHistorico();">Febrero</button>
<button class="dropdown-item boton-enlace" type="button" onclick="recuperarBotonTiempoReal(); mostrarTablaHistorico();">Marzo</button>
<button class="dropdown-item boton-enlace" type="button" onclick="recuperarBotonTiempoReal(); mostrarTablaHistorico();">Abril</button>
<button class="dropdown-item boton-enlace" type="button" onclick="recuperarBotonTiempoReal(); mostrarTablaHistorico();">Mayo</button>
<button class="dropdown-item boton-enlace" type="button" onclick="recuperarBotonTiempoReal(); mostrarTablaHistorico();">Junio</button>
<button class="dropdown-item boton-enlace" type="button" onclick="recuperarBotonTiempoReal(); mostrarTablaHistorico();">Julio</button>
</div>
<!--FIN BOTÓN 2018-->
<!--Botón 2017-->
<button class="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenuButton_2017" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
2017
</button>
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton_2017">
<button class="dropdown-item boton-enlace" type="button" onclick="recuperarBotonTiempoReal(); mostrarTablaHistorico();">Enero</button>
<button class="dropdown-item boton-enlace" type="button" onclick="recuperarBotonTiempoReal(); mostrarTablaHistorico();">Febrero</button>
<button class="dropdown-item boton-enlace" type="button" onclick="recuperarBotonTiempoReal(); mostrarTablaHistorico();">Marzo</button>
<button class="dropdown-item boton-enlace" type="button" onclick="recuperarBotonTiempoReal(); mostrarTablaHistorico();">Abril</button>
<button class="dropdown-item boton-enlace" type="button" onclick="recuperarBotonTiempoReal(); mostrarTablaHistorico();">Mayo</button>
<button class="dropdown-item boton-enlace" type="button" onclick="recuperarBotonTiempoReal(); mostrarTablaHistorico();">Junio</button>
<button class="dropdown-item boton-enlace" type="button" onclick="recuperarBotonTiempoReal(); mostrarTablaHistorico();">Julio</button>
<button class="dropdown-item boton-enlace" type="button" onclick="recuperarBotonTiempoReal(); mostrarTablaHistorico();">Agosto</button>
<button class="dropdown-item boton-enlace" type="button" onclick="recuperarBotonTiempoReal(); mostrarTablaHistorico();">Septiembre</button>
<button class="dropdown-item boton-enlace" type="button" onclick="recuperarBotonTiempoReal(); mostrarTablaHistorico();">Octubre</button>
<button class="dropdown-item boton-enlace" type="button" onclick="recuperarBotonTiempoReal(); mostrarTablaHistorico();">Noviembre</button>
<button class="dropdown-item boton-enlace" type="button" onclick="recuperarBotonTiempoReal(); mostrarTablaHistorico();">Diciembre</button>
</div>
<!--FIN BOTÓN 2017-->
</div>
</div>
</div>
<!--FIN BOTÓN HISTÓRICO-->
PD: I attach two images of what is showing the web browser.
Aucun commentaire:
Enregistrer un commentaire