Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
453 views
in Technique[技术] by (71.8m points)

javascript - window.innerHeight ie8 alternative

I have some calculations that rely on window.innerHeight. But as I have found out this is not available in any IE before IE9. All the other options I have looked at don't even come close to the figure I get when I use window.innerHeight.

Does anybody have a work around?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

You might want to try:

document.documentElement.clientHeight;

Or can use jQuery's .height() method:

$(window).height();

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

Just Browsing Browsing

[7] html - How to create even cell spacing within a

2.1m questions

2.1m answers

60 comments

56.9k users

...