var a = document.documentElement.scrollTop != undefined ? document.documentElement || document.body; a.scrollTop = 0;