scroll to using js code example Example: scroll through page with javascript window.scroll({ top: 0, left: 0, behavior: 'smooth' });