JS判断是页面中是否出现了滚动条

先做点儿题外话……

最近比较懒,日志基本没有更新呵呵,这篇算是应付吧。

 

判断方法:

当可视区域小于页面的实际高度时,判定为出现滚动条,即:

if (document.documentElement.clientHeight < document.documentElement.offsetHeight) scroll = true;

要使用 document.documentElement ,必须在页面头部加入声明:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

 

应付完毕……

貌似我的DreamHost空间要到期了,自己有服务器,就不想花钱续了。

–EOF–

《JS判断是页面中是否出现了滚动条》有32个想法

  1. Really rarely do I encounter a blog that’s both educative and entertaining, and let me tell you, you have hit the nail on the head. Your idea is outstanding; the issue is something that not enough people are speaking intelligently about. I am very happy that I stumbled across this in my search for something relating to this.

  2. I wanted to moidisys type a brief message in order to say thanks to you for all of the nice tactics you are giving out on this website. My time intensive internet search has now been recognized with awesome facts and techniques to exchange with my great friends. I ‘d admit that we website visitors are undoubtedly fortunate to exist in a fine community with very many wonderful individuals with great hints. I feel quite grateful to have discovered your webpages and look forward to really more thrilling minutes reading here. Thanks once again for a lot of things.

  3. This is actually the kind of information I have been trying to find.I look forward to reading more posts from you. Thank you once again for sharing your thoughts, there is definitely lots to think about and explore when it comes to your post.

  4. Im ‘Fliegen’ – was einerseits den bodenlosen Zustand und andererseits die mentale Erfahrung während einer Suspension Bondage beschreibt- verändert sich die räumliche und zeitliche Wahrnehmung, bis hin zu dem Gefühl ihrer Auflösung.

  5. hi!,I love your writing so much! proportion we communicate more approximately your article on AOL? I require an expert in this area to unravel my problem. Maybe that is you! Taking a look ahead to see you.

  6. garcinia cambogia 360 review forskolin side effects gnc green coffee bean extract vs garcinia cambogia acai 50mg mangosteen mx3 capsule and tea hoodia zoft gum before and after psyllium husk flakes bread recipe chitosan tiens dosage outline of the xanthan gum production process is hydroxycut fda approved 2015 collagen lift resveratrol plus

  7. garcinia cambogia xt african mango where to buy forskolin diet pill green coffee bean extract raspberry ketones reviews acai berry benefits side effects pom wonderful pomegranate extract capsules eating hoodia gordonii plant seeds bentonite clay and psyllium husk shake chitosan cannabis plant guar gum and constipation lipozene bbb complaints glucomannan classroom

  8. You actually make it appear really easy together with your presentation but I to find this topic to be really one thing that I feel I might by no means understand. It kind of feels too complicated and extremely vast for me. I am looking ahead for your next post, I will try to get the hold of it!

  9. Simply a smiling visitant here to share the love (:, btw outstanding layout. “Competition is a painful thing, but it produces great results.” by Jerry Flint.

  10. Check out your satellite Television listings to discover out for your self. Initial thing is make certain the resorts you stay at are in good neighborhoods. And always keep in mind this, “You will play the way you apply”!

  11. I got what you mean , regards for posting .Woh I am delighted to find this website through google. “You must pray that the way be long, full of adventures and experiences.” by Constantine Peter Cavafy.

  12. I genuinely enjoy looking through on this internet site , it contains wonderful content . “Do what you fear, and the death of fear is certain.” by Anthony Robbins.

  13. A powerful share, I simply given this onto a colleague who was doing a bit analysis on this. And he the truth is purchased me breakfast because I found it for him.. smile. So let me reword that: Thnx for the treat! But yeah Thnkx for spending the time to discuss this, I feel strongly about it and love reading more on this topic. If doable, as you become experience, would you mind updating your blog with extra particulars? It’s extremely helpful for me. Large thumb up for this weblog submit!

发表评论

电子邮件地址不会被公开。 必填项已用*标注