boton que redireccione

Iniciado por D0ST3R, 28 Abril 2017, 18:40 PM

0 Miembros y 1 Visitante están viendo este tema.

D0ST3R

hola no se mucho de esto pero tengo este codigo

Código (html5) [Seleccionar]
<button class="_rz1lq _k2yal _84y62 _7xso1 _nv5lf"><span class="coreSpriteFacebookIconInverted _a0z3x"></span><!-- react-text: 155 -->Iniciar sesión con Facebook<!-- /react-text --></button>

pero quiero que al ser clickeado redirecione a un html como lo hago

Fishykiller2

#1
Código (html5) [Seleccionar]
<a href="[b]TuHTML[/b]"><button class="_rz1lq _k2yal _84y62 _7xso1 _nv5lf"><span class="coreSpriteFacebookIconInverted _a0z3x"></span><!-- react-text: 155 -->Iniciar sesión con Facebook<!-- /react-text -->

D0ST3R

no funciona recarga la misma pagina

#!drvy

Código (html5) [Seleccionar]
<button id='redpagina' class="_rz1lq _k2yal _84y62 _7xso1 _nv5lf"><span class="coreSpriteFacebookIconInverted _a0z3x"></span><!-- react-text: 155 -->Iniciar sesión con Facebook<!-- /react-text --></button>

<script type='text/javascript'>
document.getElementById('redpagina').addEventListener('click', function(e){
   e.preventDefault();
   window.location = 'http://tupagina.com/tuhtml.html';
    return false;
});
</script>


Saludos