Ver Mensaje Individual
  #3 (permalink)  
Antiguo 12/11/2006, 05:06
Avatar de BonRouge
BonRouge
 
Fecha de Ingreso: noviembre-2006
Mensajes: 51
Antigüedad: 17 años, 6 meses
Puntos: 0
El atributo 'target' ha sido desaprobado por el W3C y no deberías usarlo. Si quieres una función para abrir una ventana nueva, aquí tienes:
Código:
function external(){
	var exlinks=document.getElementsByTagName('a');
	for (i=0; i<exlinks.length; i++) {
		if (exlinks[i].getAttribute('rel')=='external') {
			exlinks[i].onclick=function() {window.open(this.href,""); return false}
		}
	}
}
window.onload=external;
Solo hay que añadir 'rel="external"' en la etiqueta 'a'.

Última edición por BonRouge; 12/11/2006 a las 06:01