Adaptar WEB a resolucion

Necesito adaptar la pagina en funcion de la resolucion del cliente
Alguien me puede dar un codigo o explicar como hacerlo.
Gracias
Un saludo.

1 Respuesta

Respuesta
1
<html>
<head>
<SCRIPT LANGUAGE="JavaScript">
<!--
function reDir() {
var url640x480 = "640.html";
var url800x600 = "800.html";
var url920x720 = "920.html";
var url1024x768 = "1024.html";
var url1152x864 = "1024.html";
var url1280x960 = "1024.html";
var url1280x1024 = "1024.html";
if ((screen.width == 640) && (screen.height == 480))
window.location.href= url640x480;
else if ((screen.width == 800) && (screen.height == 600))
window.location.href= url800x600;
else if ((screen.width == 920) && (screen.height == 720))
window.location.href= url920x720;
else if ((screen.width == 1024) && (screen.height == 768))
window.location.href= url1024x768;
else if ((screen.width == 1152) && (screen.height == 864))
window.location.href= url1152x864;
else if ((screen.width == 1280) && (screen.height == 960))
window.location.href= url1280x960;
else if ((screen.width == 1280) && (screen.height == 1024))
window.location.href= url1280x1024;
else window.location.href= url800x600;
}
// -->
</SCRIPT>
</head>
<body onload="reDir();">
</body>
<html>

Añade tu respuesta

Haz clic para o

Más respuestas relacionadas