Autor | Zpráva | ||
---|---|---|---|
BlueRain Profil |
#1 · Zasláno: 16. 10. 2007, 21:11:30
<div id="neco" style="width:80%;height:20%">
</div> <script> document.write(document.window.getElementById('neco').height) </script> Proč mi to píše undefined ?? |
||
BlueRain Profil |
#2 · Zasláno: 16. 10. 2007, 21:13:47
Sry za titulek. Nejak mi to tam skočilo a nejde to zmenit....
|
||
Joker Profil |
#3 · Zasláno: 16. 10. 2007, 21:14:33 · Upravil/a: Joker
To window tam nemá co dělat.
edit: resp. když už, tak window.document.getElementById('neco') a ne document.window.getElementById('neco') |
||
BlueRain Profil |
#4 · Zasláno: 16. 10. 2007, 21:16:14
Joker
Ale i tak to píše undefined |
||
Joker Profil |
#5 · Zasláno: 16. 10. 2007, 21:33:03
aha. Tak potom místo "height" má být "offsetHeight".
|
||
peta Profil |
#6 · Zasláno: 17. 10. 2007, 08:26:55
BlueRain
height existuje u style.height, jinak je offsetHeight nebo jine parametry google.com offsetHeight se dostanes na takovou peknou tabulku http://developer.mozilla.org/en/docs/DOM:element |
||
Časová prodleva: 17 let
|
0