bug_x

导航

 
form.addEventListener('submit', (e) => {
  e.preventDefault();
  scrollOptions = {
    left: leftInput.value,
    top: topInput.value,
    behavior: scrollInput.checked ? 'smooth' : 'auto'
  }

  window.scrollTo(scrollOptions);
});

 

posted on 2020-03-14 20:37  bug_x  阅读(247)  评论(0编辑  收藏  举报