block scroll when modal is open code example Example: javascript disable scrolling on body document.body.style.overflow = 'hidden';