Ver Mensaje Individual
  #2 (permalink)  
Antiguo 04/03/2013, 11:38
Avatar de memoadian
memoadian
Colaborador
 
Fecha de Ingreso: junio-2009
Ubicación: <?php echo 'México'?>
Mensajes: 3.696
Antigüedad: 14 años, 10 meses
Puntos: 641
Respuesta: ¿ Extensión en chrome para visualizar tamaño ventana navegador en tiempo r

eso lo puedes hacer con simple javascript

Código HTML:
Ver original
  1. <script type="text/javascript">
  2. function TamVentana() {
  3.   var Tamanyo = [0, 0];
  4.   if (typeof window.innerWidth != 'undefined')
  5.   {
  6.     Tamanyo = [
  7.         window.innerWidth,
  8.         window.innerHeight
  9.     ];
  10.   }
  11.   else if (typeof document.documentElement != 'undefined'
  12.       && typeof document.documentElement.clientWidth !=
  13.      'undefined' && document.documentElement.clientWidth != 0)
  14.  {
  15. Tamanyo = [
  16.        document.documentElement.clientWidth,
  17.        document.documentElement.clientHeight
  18.    ];
  19.   }
  20.   else   {
  21.     Tamanyo = [
  22.         document.getElementsByTagName('body')[0].clientWidth,
  23.         document.getElementsByTagName('body')[0].clientHeight
  24.     ];
  25.   }
  26.   return Tamanyo;
  27. }
  28. window.onresize = function() {
  29.   var Tam = TamVentana();
  30.   document.getElementById('body').innerHTML = ('La ventana mide: [' + Tam[0] + ', ' + Tam[1] + ']');
  31. };
  32. <body id="body">
  33. </body>