You must first download the files needed to use the Bootstrap and Jquery.
After downloading, put the files in your project and refer the files to your page that you want to use the component (modal).
After the reference is made, add this code to your page.
<button type="button" class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal">
Abrir
</button>
<!-- Modal -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="modal-title" id="myModalLabel">Título</h4>
</div>
<div class="modal-body">
Coloque o texto aqui.
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Fechar</button>
<button type="button" class="btn btn-primary">Salvar</button>
</div>
</div>
</div>
</div>
At this link you find an example of how the use would look, and the site has other components that can be useful to you.
Take a look here, there’s something very similar to what you want http://answall.com/questions/32474/como-eu-crio-uma-janela-floatingem-html
– Luis Henrique
You are searching for an answer that does not use any Javascript library/framework?
– Renan Gomes
I just wish when I hit a button, a window would open.
– Piu
Luis, you didn’t solve my case. It didn’t work here
– Piu
Use Bootstrat or could use?
– Randrade
Huh? I don’t get it.. Bootstrat?
– Piu
King, at a glance: http://jsfiddle.net/a33p4wy3/8/
– MarceloBoni
Bootstrap is a front-end framework. It does what you need. If you can use elaborate an answer showing how to do.
– Randrade
You can use anything, as long as it works.
– Piu
@King, you can look at my answer in another question: http://answall.com/a/51706/2363
– Tobias Mesquita
@King, you should keep in mind that for the modal window to work, you should reference the required libraries, for example,
JQuery
,BootStrap
, or create a solution manually usingJavaScript
pure– MarceloBoni
Toby, I saw it, but the minute I hit the button, there’s nothing.
– Piu
Marcelo, like, I don’t know much about it. I’m just asking for help to do haha
– Piu
Yes @King, but to do so, you must understand the minimum ;] take a read -> http://answall.com/tags/jquery/info
– MarceloBoni
this can also help: https://www.codigofonte.net/dicas/javascript/310_jquery-que-e-e-como-use
– MarceloBoni
Hey, guys, thanks, but I think I got it.
– Piu
If any of the answers helped you, please mark it as correct.
– Randrade