Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [js] Przerobienie skryptu
DamSon
post 4.06.2004, 23:26:18
Post #1





Grupa: Zarejestrowani
Postów: 3
Pomógł: 0
Dołączył: 2.06.2004

Ostrzeżenie: (0%)
-----


[xml:1:b1f48ee245]<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=iso-8859-2">
<script type="text/javascript">
function rozmiar(){
tabela = document.getElementById('tabela_center');
wys = document.body.clientHeight;
//window.status = wys;
if(wys < 550){
tabela.style.height = 200;
}else{
if(wys >= 550 && wys < 650){
tabela.style.height = 320;
}else{
tabela.style.height = 400;
}
}
}
</script>
</head>
<body style="margin:0; padding:0;" onload="rozmiar()" onresize="rozmiar()">
<div id="tabela_center" style="width:500; height:500;background-color:
red;">
</div>
</body>
</html>
[/xml:1:b1f48ee245]


Czy ktoś mogłby zmienić powyższy skrypt na taki aby działał on z obrazkami .jpg o ile wogóle jest taka możliwość
Go to the top of the page
+Quote Post
rzseattle
post 5.06.2004, 09:43:20
Post #2





Grupa: Przyjaciele php.pl
Postów: 554
Pomógł: 0
Dołączył: 4.04.2002
Skąd: Tychy

Ostrzeżenie: (0%)
-----


Przeniesione z forum php Skrypty.


--------------------
"Real children don't go hoppity-skip unless they are on drugs."
Go to the top of the page
+Quote Post
Paul
post 5.06.2004, 11:00:07
Post #3





Grupa: Zarejestrowani
Postów: 636
Pomógł: 0
Dołączył: 22.10.2003
Skąd: Katowice

Ostrzeżenie: (0%)
-----


[xml:1:943b0fa00b]<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=iso-8859-2">
<script type="text/javascript">
function rozmiar(){
tabela = document.getElementById('img');
wys = document.body.clientHeight;
if(wys < 550){
img.style.height = 200;
}else{
if(wys >= 550 && wys < 650){
img.style.height = 320;
}else{
img.style.height = 400;
}
}
}
</script>
</head>
<body style="margin:0; padding:0;" onload="rozmiar()" onresize="rozmiar()">
<img src="http://www.google.pl/images/hp0.gif" id="img">
</body>
</html> [/xml:1:943b0fa00b] :?:
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Wersja Lo-Fi Aktualny czas: 13.06.2025 - 10:14