Comunidad de diseño web y desarrollo en internet online

HOWTO: Impedir que tus paginas sean abiertas en un IFRAME

Citar            
MensajeEscrito el 13 Sep 2007 02:27 pm
Esta porción de código en JS impide que tus paginas sean abiertas desde un iframe, si se intenta cargar tu pagina desde un iframe la redirecciona.


<script type="text/javascript">
if (top.location != self.location) {
alert("Redireccionando...");
top.location = self.location.href;
}
</script


muy util.

Por neohunter

Claber

563 de clabLevel

1 tutorial

 

Bogota, Colombia

firefox
Citar            
MensajeEscrito el 13 Sep 2007 04:58 pm
top.location.href = self.location.href;

Por Dano

BOFH

4273 de clabLevel

14 tutoriales
4 articulos
10 ejemplos

Genero:Masculino   Bastard Operators From Hell Premio_Secretos

Lugar estratégico para vigilarte

firefox

 

Cristalab BabyBlue v4 + V4 © 2011 Cristalab
Powered by ClabEngines v4, HTML5, love and ponies.