admin管理员组

文章数量:1326332

I have a div.

I want that user should not be able to scroll the page if the height is more than 350px. Also the scroll bar should be visible in disable mode in that case.

I want to achieve this using javascript.

Thanks

I have a div.

I want that user should not be able to scroll the page if the height is more than 350px. Also the scroll bar should be visible in disable mode in that case.

I want to achieve this using javascript.

Thanks

Share Improve this question asked Jun 10, 2009 at 8:46 ArunArun 2
  • Please revise your question. None of what you wrote makes sense.. to me at least :) – cllpse Commented Jun 10, 2009 at 8:53
  • "If the div is higher than 350px, disable scrolling for the whole page", is that what you're after? I don't think there is a "disable" mode for scrollbars. Either they're there, or they're not. – peirix Commented Jun 10, 2009 at 8:57
Add a ment  | 

2 Answers 2

Reset to default 4

I can't say I pletely understood what you want, but I think what you're looking for is CSS not javascript. Take a look at the overflow property.

Seems like you're looking for overflow: hidden; perhaps?

本文标签: javascriptdisable scroll bar on the divStack Overflow