Показать сообщение отдельно
  #4 (permalink)  
Старый 21.04.2009, 13:23
Gamler
 
Сообщений: n/a

Сообщение от Kolyaj Посмотреть сообщение
lancer,
var ua = navigator.userAgent.toLowerCase();
var isOpera = (ua.indexOf('opera')  > -1);
var isIE = (!isOpera && ua.indexOf('msie') > -1);

function getDocumentHeight() {
  return Math.max(document.compatMode != 'CSS1Compat' ? document.body.scrollHeight : document.documentElement.scrollHeight, getViewportHeight());
}

function getViewportHeight() {
  return ((document.compatMode || isIE) && !isOpera) ? (document.compatMode == 'CSS1Compat') ? document.documentElement.clientHeight : document.body.clientHeight : (document.parentWindow || document.defaultView).innerHeight;
}
В IE этот код неработет!
Что можна придумать с Explorer'ом?
Ответить с цитированием