calcular dimensiones pantalla, navegador, document....


/ Published in: JavaScript
Save to your folder(s)



Copy this code and paste it in your HTML
  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

You need to login to post a comment.