How to disable scrolling the document body?

If you want to use the iframe’s scrollbar and not the parent’s use this: = 'hidden';

If you want to use the parent’s scrollbar and not the iframe’s then you need to use:

document.getElementById('your_iframes_id').scrolling = 'no';

or set the scrolling="no" attribute in your iframe’s tag: <iframe src="" scrolling="no">.

Leave a Comment