We Recommend

Pro JavaScript Techniques Pro JavaScript Techniques
Pro JavaScript Techniques is the ultimate JavaScript book for the modern web developer. It provides everything you need to know about modern JavaScript, and shows what JavaScript can do for your web sites. This book doesn't waste any time looking at things you already know, like basic syntax and structures.


Posted By

joseluis on 06/08/07


Tagged

javascript dimensions


Versions (?)


Who likes this?

2 people have marked this snippet as a favorite

luman
noah


calcular dimensiones pantalla, navegador, document....


Published in: JavaScript 


  1. alert('maximo height='+screen.availHeight+'\nmaximo width='+screen.availWidth+'\nOuter height='+window.outerHeight+'\nOuter Width='+window.outerWidth+'\ninner height='+window.innerHeight+'\ninner Width='+window.innerWidth+'\nResolucion de pantalla height='+screen.height+'\nResolucion de pantalla width='+screen.width);
  2.  
  3. if (window.innerHeight){
  4. //navegadores basados en mozilla
  5. var heightVentana = window.innerHeight;
  6. }else{
  7. //navegadores basados en IExplorer
  8. var heightVentana = document.documentElement.clientHeight;
  9. }

Report this snippet 

Comments

RSS Icon Subscribe to comments
Posted By: joseluis on June 27, 2007

con dojo: dojo.html.getViewport();

You need to login to post a comment.