capturar resolucion de pantalla del cliente

18/05/2004 - 23:00 por Mauricio Cid Duran | Informe spam
como se puede mostrar una pagina cuando la resolucion sea de 800x600 y
cuando sea de 1024x768 mostrar otra pagina. osea nesesito detectar la
resolucion de pantalla del cliente.
 

Leer las respuestas

#1 GONZALO SKARMETA
18/05/2004 - 23:25 | Informe spam
Con esto capturas la resolucion del cliente:

<script language="JavaScript" type="text/javascript">
<!--
function test(){
if (screen.availHeight ){
height = screen.availHeight ;
alert("availHeight = "+height );
}
if (screen.availWidth ){
width = screen.availWidth ;
alert("availWidth = "+width );
}

if (screen.height ){
height = screen.height ;
alert("height = "+height );
}
if (screen.width ){
width = screen.width ;
alert("width = "+width );
}
}
//-->
</script>

como se puede mostrar una pagina cuando la resolucion


sea de 800x600 y
cuando sea de 1024x768 mostrar otra pagina. osea


nesesito detectar la
resolucion de pantalla del cliente.


.

Preguntas similares