Well, there is an inbuilt function in JavaScript named scroll() which takes 2 arguments x and y.If you want to set top and left to 0 then call this.window.scroll(0,0);
Javascript
Topic: JS Window
How can you set position of the page (Top and Left) to 0 using Javascript in one line code?
Browse random answers:
What is a Window Object?
To put a "close window" link on a page ?
Can you explain about Screen object?
How to get height and width of different browser in Javascript?
What is difference between window.onload and onDocumentReady?
How to determine the state of a checkbox using Javascript?
How to get the contents of an input box using Javascript?
What is other equivalent option of document.getElementById() when you are working with Ajax?
How to toggle display an HTML element?
How to get the Scroll height and Width in JavaScript !!
How can you set position of the page (Top and Left) to 0 using Javascript in one line code?
Basic methods for opening a PopUp window using Javascript?
What is the difference of "setTimeout" function and setInterval functions in Javascript
How do you submit a form using Javascript ?
Explain with an example the use of event handlers in JavaScript.
How to open a window with no toolbar, but with the location object.
How to reload the current page
Difference between window.onload and onDocumentReady?