codice:
<!doctype html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Esempio</title>
<script type="text/javascript">
var bArrow = false, oArrow = document.createElement("div");
oArrow.id = "frecciaSu";
oArrow.innerHTML = "<a href=\"#topPagina\" title=\"Torna su\">&uarr;<\/a>";
window.onscroll = function() {
var scrollY = document.documentElement.scrollTop || document.body.scrollTop;
bArrow = scrollY > 1300 ?
bArrow || (document.body.appendChild(oArrow), true)
: bArrow && (document.body.removeChild(oArrow), false);
};
</script>
<style type="text/css">
#frecciaSu {
position: fixed;
height: auto;
width: auto;
left: 10px;
top: 10px;
font-size: 36px;
}
#frecciaSu a { text-decoration: none; }
</style>
</head>
<body>
</body>
</html>
Ho impostato lo scroll a 1300 pixel... ma puoi cambiarlo a piacimento.