Javascript-форум (https://javascript.ru/forum/)
-   Events/DOM/Window (https://javascript.ru/forum/events/)
-   -   Изменение размеров при загрузке (https://javascript.ru/forum/events/22550-izmenenie-razmerov-pri-zagruzke.html)

RamPi 24.10.2011 17:35

Изменение размеров при загрузке
 
<script>
function getClientHeight()
{
  return document.compatMode=='CSS1Compat' && !window.opera?document.documentElement.clientHeight:document.body.clientHeight;
}
function getheight(){
var winh = (getClientHeight()) - 60;
document.getElementById('cli').style.height = (Math.round(winh/100*60)-1) + "px";
document.getElementById('bottom').style.height = (Math.round(winh/100*40)-1) + "px";
}
</script>



<body onLoad="getheight()">

Добрый день. Скрипт отлично пашет в Хроме, ФаерФоксе но опера подводит не подскажете что добавить чтоб заработало???


Часовой пояс GMT +3, время: 15:30.