Html & Script

[js] 큰 그림 갤러리용 오토스크롤

컨텐츠 정보

본문

html 이 안되니까 답답하네요.

javascript:window.open('http://my.netian.com/~crosser/popup.html', '_blank', 'width=300px,height=400px');

주소창에 붙여넣으세요.



정태영님의 소스를 조금 고쳤습니다.
재밌는 스크립트지요.



소스
<html>
<head>
<meta http-equiv="ImageToolbar" content="No">
<script>
var scrx = 1024, scry = 768;
function resizing(i)
{
if(i.width > scrx)
scrx += 10;
else
scrx = i.width + 10;
if(i.height > scry)
scry += 30;
else
scry = i.height + 30;
window.resizeTo(scrx, scry);
scrx -= 300;
scry -= 300;
if(scrx < 0)
scrx = 0;
if(scry < 0)
scry = 0;
}

//asf = document.getElementsByName('asdf');
function winscroll(i, e)
{
x = parseInt(i.width * (e.clientX - 150) / scrx);
y = parseInt(i.height * (e.clientY - 150) / scry);
if(x < 0)
x = 0;
if(y < 0)
y = 0;
window.scroll(x, y);
}
</script>
</head>
<body style="margin:0;">
<a onclick="self.close();">
<img src="http://new.gnome.or.kr/albums/coolimages/afl.jpg" border="0" onload="resizing(this);" onmousemove="winscroll(this, event);">
</a>
</body>
</html>

관련자료

댓글 0
등록된 댓글이 없습니다.
Today's proverb
인생은 자유로이 여행할 수 있도록 시원하게 뚫린 대로가 아니다. 때로는 길을 잃고 헤매기도 하고 때로는 막다른 길에서 좌절하기도 하는 미로와 같다. (누가 내 치즈를 옮겼을까? 중에서)