1
Bootstrap (how to do the menu bar by assigning values to buttons. .ex.: I created the "Home" button, as I can assign a value to it for when I access it I go to the home button page...)
1
Bootstrap (how to do the menu bar by assigning values to buttons. .ex.: I created the "Home" button, as I can assign a value to it for when I access it I go to the home button page...)
1
The classes btn
and btn-*
can be used both in Buttons (<button>
) as links (<a>
):
<button class="btn btn-primary" id="botao">Botão</button>
<a href="https://www.google.com/" class="btn btn-primary">Link</a>
If you use the <button>
you have to use Javascript/jQuery to change the location as explained by @pnet.
See here: http://jsfiddle.net/B8L77/
You can see the official documentation about buttons here.
0
You can create for example:
<a href="#"><button type="button" class="btn btn-default">Inicio</button></a>
You can also see examples of using links and buttons here for example
http://getbootstrap.com/components/#navbar
Other mode and using javascript or jquery and onclicked.
0
You can also create a function in jquery that calls your page and on the button call that function like this:
Jquery:
function chamaInicio(){
$(window.document.location).attr('href','url_da_sua_pagina_completo_aqui');
}
And here’s the call on your button
<input id="btnChamaInicio" type="button" class="btn btn-success col-md-1" value="Inicio" onclick=" return chamaInicio();" />
Test and put the result.
Browser other questions tagged javascript twitter-bootstrap
You are not signed in. Login or sign up in order to post.
Can you explain your question better? It’s unclear.
– Sergio
Thus?
<a href="inicio.html" class="btn btn-primary" role="button">Início</a>
– bfavaretto