Ver Mensaje Individual
  #9 (permalink)  
Antiguo 05/06/2012, 00:48
xinxan22
 
Fecha de Ingreso: septiembre-2005
Mensajes: 522
Antigüedad: 18 años, 7 meses
Puntos: 0
Respuesta: Problemas con screen.width

Vale ya lo tengo ...

Furoya, con el meta que me has enviado:

Código HTML:
<meta name="viewport" content="initial-scale=1.0, user-scalable = no"/> 

y el código que estaba utilizando:

Código HTML:
<html>
<head>
<script language="javascript">
function getSize()
{
	var width = window.screen.width;
	var height = window.screen.height;
	document.write("Width: " + width + " Height: " + height);
}
setTimeout(getSize(), 200);
</script>
</head>
<body style="font-size:200%;"></body>
</html> 

Es decir ... este código me da el width:320 y height:401 que es la resolución del telefono :

Código HTML:
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable = no"/>
<script language="javascript">
function getSize()
{
	var width = window.screen.width;
	var height = window.screen.height;
	document.write("Width: " + width + " Height: " + height);
}
setTimeout(getSize(), 200);
</script>
</head>
<body style="font-size:200%;"></body>
</html> 

Muchas gracias :)