Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Detecting scrollbars
Message
Information générale
Forum:
Internet
Catégorie:
Javascript
Divers
Thread ID:
00647124
Message ID:
00647139
Vues:
19
>How can I detect if a scrollbars are present within a page? I tried the following but that doesn't seem to work:
>
>
>if (window.scrollbars)
>{
>   alert('scrollbars exist')
>}
>else
>{
>   alert('scrollbars do not exist')
>}
>
Not tested, but must work:

Test the document.body.scroll property to know if scrollbar are on or off
and, if on, compare the document.body.scrollHeight (visible area)
with the document.body.clientHeight (window or frame height).
If we exchange an apple, we both get an apple.
But if we exchange an idea, we both get 2 ideas, cool...


Gérald Santerre
Independant programmer - internet or intranet stuff - always looking for contracts big or small :)
http://www.siteintranet.qc.ca
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform