I want to open a page with a button, but it doesn't open in another tab but it opens in the same one and I don't get it.
<button type="button" class="btn btn-success btnterapia" onClick="parent.open('http://localhost/adela/contacto/')">PIDA CITA</button>
<button type="button" class="btn btn-success btnterapia" onClick="window.open('http://localhost/adela/contacto/')">PIDA CITA</button>
What do I have to put in onclick="........('http....)
Good if you want to open another page on this same page you could use javascript as long as it is enabled.
You would have something like this:
If they
class
apply the same CSS to all elements you could use a simple type tag<a href></a>
and put themclass
so that it visually behaves like abutton
:I understand that either of these two methods can and should work for you. :)
htmljscss _ _
You should do better with the element
<a>
but with window.open() you can get it too:which you pass the target
_self
to open it in the same window.