Discusión: pop us aleatorios
Ver post
Old 03-Oct-2006, 07:43 PM   #3
isaacluz
Junior
Registrado: June-2006
Location: México
Posts: 9
HTML Code:
<script>
function PopUpWindow(URL,Ancho,Alto) {
	Izquierda = (screen.width-Ancho)/2;
	Arriba= (screen.height-Alto)/2; 
	ventana = window.open(URL, "", 'width='+Ancho+',height='+Alto+',left='+Izquierda+',top='+Arriba+',fullscreen=no,toolbar=0,location=0,directories=0,status=0,menubar=0,resizable=1,scrolling=0,scrollbars=0');
}

function PopUpsAleatorias(){
	// LAS PAGINAS A ABRIR
	var Paginas = new Array()
	Paginas.push('http://google.com');
	Paginas.push('http://yahoo.com');
	Paginas.push('http://altavista.com');
	// LA SELECCION ALEATORIA
	PaginaAleatoria = Math.floor (Math.random()*Paginas.length);
	// ARBIMOS EL POPUP
	PopUpWindow(Paginas[PaginaAleatoria],300,200);
}

PopUpsAleatorias();
</script>]
__________________
There´s no place like localhost
isaacluz is offline   Citar y responder