Obtener la altura del documento (cross-browser) IE, FF, Chrome, etc

document-height

La siguiente función retorna la altura de cualquier documento sin importar el navegador. Ha sido probada en IE6/7/8, FF2/3, Safari (Windows), Google Chrome y Opera 9.5:

function getDocHeight() {
    var D = document;
    return Math.max(
        Math.max(D.body.scrollHeight, D.documentElement.scrollHeight),
        Math.max(D.body.offsetHeight, D.documentElement.offsetHeight),
        Math.max(D.body.clientHeight, D.documentElement.clientHeight)
    );
}

4 Respuestas a Obtener la altura del documento (cross-browser) IE, FF, Chrome, etc

  1.  

    como intalar navegador a nokia 5800

    •  

      muy bueno

    • ¿Cuál navegador necesitas?

       
  2.  

    Muchas gracias,
    lo estaba necesitando

leave your comment