Botão" Topo" para subir no inicio da página

Codigo HTML:

<a id="gotop" href="#" onclick="MGJS.goTop();return false;">Topo</a>