Ver Mensaje Individual
  #7 (permalink)  
Antiguo 16/08/2011, 19:25
Avatar de xlos_mas_pro
xlos_mas_pro
 
Fecha de Ingreso: mayo-2011
Ubicación: Santiago
Mensajes: 359
Antigüedad: 12 años, 11 meses
Puntos: 11
Respuesta: Ajuste de resolucion de pantalla

Buen como JS es parecido a php en sentido operadores supongo hice el codigo y me quedo algo haci alguien me puede decir si esta correcto
Cita:
// LE AÑADI LO QUE ESTA EN ROJO
if(screen.width < 640){
document.write('<link rel="stylesheet" type="text/css" href="css/menor.css">');
}
if(screen.width > 1600){

document.write('<link rel="stylesheet" type="text/css" href="cssmayor.css">');

}

if (screen.width == 640) {
document.write('<link rel="stylesheet" type="text/css" href="css/640.css">');
alert(" Usted utiliza un resolucion 640x480 demaciado pequeña ");
}
if (screen.width == 800) {
document.write('<link rel="stylesheet" type="text/css" href="css/800.css">');
alert("Usted utiliza una resolucion en 800 x 600 Estandar Mundosic");
}
if (screen.width == 1024) {
document.write('<link rel="stylesheet" type="text/css" href="css/1024.css">');
alert("Resolucion en 1024 x 768 Normal para el sitio");
}
if (screen.width == 1280) {
document.write('<link rel="stylesheet" type="text/css" href="css/1280.css">');
alert("Resolcuion en 1280 x 960 Normal para el sitio");
}
if (screen.width == 1600) {
document.write('<link rel="stylesheet" type="text/css" href="css/1600.css">');
alert("Resoilucion en 1600 x 1200 Normal para el sitio");
}
if(screen.width > 1600){

document.write('<link rel="stylesheet" type="text/css" href="css/640.css">');

}