1. 부드럽게 올리기

<script>
var scrollUpDelay = 1;
var scrollUpSpeed = 30;
function scrollUp()
{
	if(document.body.scrollTop<1)
	{
		return;
	}
	document.body.scrollTop=document.body.scrollTop-scrollUpSpeed;
	setTimeout('scrollUp()',scrollUpDelay);
}
</script>
<a href="javascript:scrollUp();">Go Top</a>

2. 간단

1. <a href="#">Go Top</a>
2. <a href="javascript:scroll(0,0)">Go Top</a>

※ 2-2 는 Firefox 에서 작동하지 않는다. 추가 정보 – http://wallel.com/241

Comments +0

Leave a Comment

Your email address will not be published.
You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>