Consider the following code:
GoTo Label2
... [content here] ...
More content
no "#" when you use window.location.hash
The solution
document.getElementById('MyID').scrollIntoView(true);
works well in almost all browsers, whereas I've noticed that in some browsers or in some mobile (such as some Blackberry versions) "scrollIntoView" function is not recognized, so I would consider this solution (a bit uglier than the previous one):
window.location.href = window.location.protocol + "//" + window.location.host +
window.location.pathname + window.location.search +
"#MyAnchor";