iframe et hauteur sans le px.
Salut,
Voici le code tout simple:
Code:
1 2 3
| document.getElementById('main_iframe').style.height = main_iframe.document.body.scrollHeight - 256 ;
alert(document.getElementById('main_iframe').style.height) ;
if( document.getElementById('main_iframe').style.height <= main_iframe.document.body.scrollHeight ) { |
Quand je fais une alert de main_iframe.document.body.scrollHeight cela me sort un chiffre avec px du style: 696px
Donc le if(...) ne peut pas marcher.
Question simple, comment enlever les "px" ?
Merci,
Vincent.