In facul's work, I'm making an app with several menus, if I'm doing everything in a single html, it's going to be a huge file. So by clicking the options on a particular menu, I'd like to continue running the app with another html document, loaded instead of the current one. Could you do with html with something like: < a href ..... / > right?
But I'd like to do this within a javascript function, which is triggered by clicking a button on a menu. Here's the snippet of my code:
<div class="menu" id="menuCorNaoCor" style="display:none">
<div class="centralizar">
<button class="botao" onClick="carregarMenuCorrentista()"> Correntista </button>
<button class="botao" > Não Correntista </button>
</div>
</div>
<script>
function carregarMenuCorrentista(){
//Carrega o menu, que está em outro documento html
}
</script>