Vue Js Scroll to Top of Page
Vue.Js Scroll to the top of the page: Vue.js makes it easy to scroll to the top of a page using the JavaScript method window. scrollTo(x,y) . You can use the native JavaScript functions window. scrollTo('0',0') function in vue.js To scroll the top of page on click the button.
written
reviewed
updated
Thanks for your feedback!
Your contributions will help us to improve service.
How to Use Vue JS to Scroll to the Top of a Page
With Vue.js, scrolling to the top of a page can be easily achieved using the v-on directive to call a method that uses the window.scrollTo(0,0) method
Output of above example
Ad